Skinbase.org Skinbase.org

URGENT! How to use any kind of includes in ad news function?

By omthai
404 views 3 replies
slammeddime avatar
slammeddime
Member
OP
I´m not very good with PHP, but here may be something to help you out...if I understand what you´re asking correctly.

First, in your message, if you want something to be run when called, put quotes like and around it.

In your code for where your page is displayed (ie: WebMagazine) add a function runCode(&$text). Pass in the text for your message into this function. Inside this function, do a substring on anything between and . Then use php´s eval() function to evaluate this the substring.

I would then have the function runCode() return the passed in message, only without the , and everything in between. That way it is not displayed to the viewer, but still in the database.

I haven´t done much PHP, and am still learning...but this may work for you.
omthai avatar
omthai
Member
Hi SD, <br /> <br />Thanks for the quick reply. If it isn&acute;t too much to ask, could you please write the code so that some other users can copy and paste this function in to their newman.lib file. <br /> <br />Thanks in advance, <br /> :smile:
slammeddime avatar
slammeddime
Member
I would if I could, but as I stated, it&acute;s only an idea, and I don&acute;t know if it would work, and my coding would be too slopy to make anything useful. And I also thought about something. <br /> <br />if this function passed in &$text, instead of just $text, it would not need to return anything, and any editing or deleting of the info between the [code] tags could be done directly in the function. <br /> <br />I don&acute;t think this would be a good script or function to run on a server, because if someone got unauthorized access to your newsmanager, they could easily copy and paste malicious code into a news article, and then run the article via your front page, or wherever. So, could i write the code for this? probably, as I&acute;m sure you could too, but I will not, because of the security risks involved, as well as the time I don&acute; t have on my hands. Sorry.
segdoune avatar
segdoune
Member
Hi. <br />How can i include the News scroller on my site front page. <br />Is there an include statement that I could use. <br />I can seperate the scroller but It wont update. <br />Any help would be great. <br />Keep smiling <br />Colin
Sign in to post a reply.