![]() |
PhotoPost Random Image Option
I have made an add-on that will display random images from PhotoPost on the forums home page, seen here: http://www.modernengineuity.com/forums/index.php
What I want to do is make this an option in the user CP. I have already added the option to the user control panel and made a separate forumhome template. What I need help with is modifying index.php to display this template depending on whether or not the user has chosen this option. Thanks. |
Add a field fo the user table. Then make your radio buttons in the modifyoptions template. And use your name attributes value to update the field to 1 for yes and 0 to no :)
- miSt |
Thanks for the reply Mist. That's exactly what I have done. I wasn't completely sure of that so it's good to know.
What I need to do now, and what is giving me problems, is use this to display or not display the random image template on the forums home. Does that make sense? |
PHP Code:
|
Well, tried a few things, but it didn't work.
Here is what I'm using to display the thumbnails now PHP Code:
So is this right to make it optional? PHP Code:
Sorry for all the questions. |
No idea where you want to put it but that's how the code should be :)
- miSt |
Thanks for all the help so far. I figured out how to make it work that way. The only problem is that I had the table for the thumbnails hardcoded in the forumhomes template. So when the option was set to no it just left an empty table.
I made a completely separate template for this, but I haven't had any luck calling the template. I'm thinking you have to set the variable for the template in index.php and then add the variable to the forumshome template where I want it to show up, right? Any idea how to do this? |
Anybody have any suggestions? :confused:
|
After taking a break from it, I got it working. I guess I had just been at it for too long before, because I figured it out pretty quickly this time around. If anyone is interested in using it, PM me.
|
You should simply post it...
|
All times are GMT. The time now is 09:46 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|