Welcome Guest, Not a member yet? Register   Sign In
Templates
#1

[eluser]IvanBernat[/eluser]
Hi guys!

I'm a total newbie to CI, coming from Symfony and CakePHP.

I decided to build my next site with CI, so I have a few questions:

1) The Template Parser: I want to enable my users to upload their own templates. Can standard PHP be processed from the templates, or only the {} variables get processed? I'm really hoping you'll say "NO, PHP can't be run from templates" as it can be a real pain from a security aspect (allowing users to upload files with potential malicious code).

2) Functions within templates: Anyone managed to modify the Template Parser class to enable "template functions"? E.g. if {me} is a variable, something like {fn do_something "parameter1" "parameter2"}

3) How do you go about caching templates?


Thanks upfront for your help guys!
#2

[eluser]John_Betong[/eluser]
 
Completely off topic but can you explain why the link in your signature brings up the following warning?
 
 
#3

[eluser]IvanBernat[/eluser]
John,

Simple explanation: my hosting account got hacked yesterday taking down all my sites.

Google sent me that warning an hour ago,
and am now in the process of fixing stuff up.

Apparently, my PC got hacked, the stole my FTP passwords and injected a bunch of iframes in every page.

Quick fix: change the passwords, run a full system scan.
Slow fix: have to reinstall Vista ASAP.
#4

[eluser]Dam1an[/eluser]
[quote author="John_Betong" date="1245697216"] 
Completely off topic but can you explain why the link in your signature brings up the following warning?
 
 [/quote]

According to the Google report one of the site it links to has lots of malware

Edit: Looks like he explained why before I did
#5

[eluser]IvanBernat[/eluser]
[quote author="Dam1an" date="1245697707"]Edit: Looks like he explained why before I did[/quote]

Thanks for the concern guys, I know I'm new here.

I just requested a review by Google.


Anyway, anyone got a clue about the template questions?
#6

[eluser]wiredesignz[/eluser]
[quote author="IvanBernat" date="1245697589"]Simple explanation: my hosting account got hacked yesterday taking down all my sites.[/quote]

Rubbish, Your site would not be listed this way within one day.

Remove the link from your signature please.
#7

[eluser]John_Betong[/eluser]
[quote author="IvanBernat" date="1245697589"]John,

Simple explanation: my hosting account got hacked yesterday taking down all my sites.

Google sent me that warning an hour ago,
and am now in the process of fixing stuff up.

Apparently, my PC got hacked, the stole my FTP passwords and injected a bunch of iframes in every page.

Quick fix: change the passwords, run a full system scan.
Slow fix: have to reinstall Vista ASAP.[/quote]
 
Hi IvanBernat,

I hope you manage to get back on track very soon.

Reminds me of that quote "Where would you like to be today..."

As far as templates are concerned then try searching the forum and also take a look at the CI Wiki.

 
 
 
#8

[eluser]Dam1an[/eluser]
[quote author="wiredesignz" date="1245698578"]
Rubbish, Your site would not be listed this way within one day.

Remove the link from your signature please.[/quote]

And even if it did, you should still remove the link for the time being, as not everyone is fortunate enough to be using Firefox which warns you about the danger
#9

[eluser]wiredesignz[/eluser]
[quote author="IvanBernat" date="1245697589"]Simple explanation: my hosting account got hacked yesterday taking down all my sites.

Google sent me that warning an hour ago,
and am now in the process of fixing stuff up.

Apparently, my PC got hacked, the stole my FTP passwords and injected a bunch of iframes in every page.

Quick fix: change the passwords, run a full system scan.
Slow fix: have to reinstall Vista ASAP.[/quote]

WTF... how did the hacker know the passwords they found were ftp related.

Reinstall Vista?

Just sounds like a whole lot of garbage.
#10

[eluser]IvanBernat[/eluser]
Google does in fact send out warnings to site admins, as quoted below

Quote:Dear site owner or webmaster of image2markup.com,

We recently discovered that some of your pages can cause users to be infected with malicious software. We have begun showing a warning page to users who visit these pages by clicking a search result on Google.com.

Below are some example URLs on your site which can cause users to be infected (space inserted to prevent accidental clicking in case your mail client auto-links URLs):

http://image2markup .com/
http://www.image2markup .com/

Here is a link to a sample warning page:
http://www.google.com/interstitial?url=h...arkup.com/

We strongly encourage you to investigate this immediately to protect your visitors. Although some sites intentionally distribute malicious software, in many cases the webmaster is unaware because:

1) the site was compromised
2) the site doesn't monitor for malicious user-contributed content
3) the site displays content from an ad network that has a malicious advertiser

If your site was compromised, it's important to not only remove the malicious (and usually hidden) content from your pages, but to also identify and fix the vulnerability. We suggest contacting your hosting provider if you are unsure of how to proceed. StopBadware also has a resource page for securing compromised sites:
http://www.stopbadware.org/home/security

Once you've secured your site, you can request that the warning be removed by visiting
http://www.google.com/support/webmasters...swer=45432
and requesting a review. If your site is no longer harmful to users, we will remove the warning.

Sincerely,
Google Search Quality Team

Hope this never happens to you too.




Theme © iAndrew 2016 - Forum software by © MyBB