![]() |
beating my head against a wall over and over again
can someone, anyone tell me how to embed a rotating javascript banner INSIDE the category description and everytime I go to update it deletes all my delicious hard earned coding.
Heeeelp! I can only pick myself and throw myself into this brick wall so many times before I turn to the bottle and drown my sorrows. ](*,) |
Re: beating my head against a wall over and over again
You can't add javascript to a database field like a category description. You'd need to hard-code it in the template and use {if} statements to only display it for that category.
|
Re: beating my head against a wall over and over again
blah!! hardcoding! excuse me while i weep tears of fear and frustration
|
Re: beating my head against a wall over and over again
would it be cheating if I ask perhaps ask what kind of if statement I need to do?
|
Re: beating my head against a wall over and over again
I'll bake you cookies
|
Re: beating my head against a wall over and over again
|
Re: beating my head against a wall over and over again
To allow javascript in category descriptions you should alter the "admin/category_modify.php" script and add:
PHP Code:
right after: PHP Code:
|
Re: beating my head against a wall over and over again
Wow, didn't know that! That makes it even easier!
|
Re: beating my head against a wall over and over again
Taking this one step further, I would put your javascript in a separate file so that you just add one line to the description. Then if you need to make changes to the banner you just do that in the js file without having to edit the description. :)
|
All times are GMT -8. The time now is 01:21 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.