![]() |
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...
|
OK. Will do so shortly. :)
|
works brilliant m8
i just logged in at your forum and i seen the pics so wetn to usercp turned em off and bingo they gone. Well done m8 |
Thanks! :D
|
1 Attachment(s)
Lo m8,feedback as promised and thanks for letting me be a tester on this hack.Install time for me was about 15 mins max on vb2.3.
Installation went smooth - had no errors what so ever and it works :) wot can i say it works - the box appears and there is 4 images in it (only downside is it says no image available but this could be to the fact photopost is not inside the vbull dir,but i have called it in and it shows the name and views etc so just need to solve this one.) Anyway went to usercp and switched it off and bingo it was gone. Hacks works sweet m8 - is one small thing though is there a query where i can set it so they are all off by default as i prefer it this way. Top hack so congrats on your next release :) Edit - pic attached as u can see the names are there just not pic an di cant run photopost in the same dir as vbull as some files have same name etc. Adds 1 querie to main page |
Glad you like it.
You can set it to be off by default by running this query: ALTER TABLE `user` CHANGE `showphoto` `showphoto` SMALLINT( 6 ) DEFAULT '0' NOT NULL As far as the problem with getting the "thumbnail not available", I'll take a look at it. |
how do you call your photos from your gallery to your board ???
are u using the thumbincluder.php or you use another method ??? i am currently writing addon hacks for pixelfx's photopost intergration (i just wrote a addon for forum home aswell :)) i have got quite tied into this lol... and i am looking for a better way to call it than implode |
Yes. This is using the thumbnail includer.
Actually the code to call the thumbs is taken form the PhotoPost site. Here is what I used in index.php: Code:
// Thumbnail includer hack I'm finalizing the full instructions for the rest of it as well and will posting them soon. |
I've been working on calling a specific user's photos and placing them in their profile. I'm getting close but it's not working yet. This is my first attempt at such a large modification. Here's what I'm doing so far.
Here's my php page code to get the user's photopost image, which when I load it in a browser window works: Code:
<?php Code:
<?php http://www.allartistaccess.com/profi....php?userid=43 How would I get this to be over in the template getinfo? |
You could try the same method as above to set the variable and then call the variable in the profile template.
You would have to add the code to member.php. |
lo SVTBlackLight01,cheers for pm all works ok now :0
|
That's great! :D
|
1 Attachment(s)
OK. Here is the install instructions for turning the PhotoPost thumbnails on/off in the user CP.
|
1 Attachment(s)
Additional instructions for adding the option to the admin control panel.
|
1 Attachment(s)
User CP
|
1 Attachment(s)
Forums Home
|
excellant m8 - quite a good hack and glad to see u released it.
|
Evertything works?
Than publish it as a beta hack ... pls |
one small thing
hack was working fine till today so unsure if was me or not.But if i go in usercp/options and turn it off then back to index page they still there.So i did a search in all files for $showphoto and its now there.Weird i know so i went back to usercp/options and where i had turned it off it had auto turned back on. Checked it about 5 times and every time i turned it off refresh page it was back on.Any idea what could be doing that ? |
I have tried to reproduce this problem repeatedly on my board, but everything is working fine.
If you added the admin option, the problem may be there. You could try using the original user.php to see if that fixes the problem. I am using both the user CP and admin CP options, however with no problems. I'm running 2.2.9. |
m8 your hack works fine - will e down to my end i added a few hacks today and of course checking that this worked after i did em was last thing on my mind so i will just need to re-trace my route and see what damage i done :)
Also your hack is basically 2 hacks you know. Cause if u forget the bit about the photos you have an excellant system for people to show a box on the forum homepage consisting of stats or links etc and users can decide if they would like to see it by turning it on/off in usercp. |
Quote:
lasto, Let us know if you get it worked out. Good point too about being able to use it for other things as well. I'm suprised it hasn't been done before. |
good hack, you should've released it seperately, it's hidden away in here :(
|
Thanks. :D
I am still planning on releasing it as a separate hack, I just haven't had much time for anything but work lately. |
All times are GMT. The time now is 04:12 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:
|