![]() |
Coppermine Random Photos on vBulletin FORUMHOME (easy)
This is basicaly the easiest way to have random photos from your Coppermine Gallery displayed on your vBulletin home page.
Tested and working perfectly. Here's the installation process containing only 3 steps. Requirements : Coppermine Photo Gallery Installed. Installation steps : 1. Download coppermine.php and edit the database info. After you're done, upload it in your forum root. 2. Open your vBulletin index.php file and under require_once('./global.php'); add the following line: Code:
require_once('coppermine.php'); 3. Open your Style Manager ("Styles & Templates" in the AdminCP menu) and edit the FORUMHOME template. Depending on where you want your random pictures to appear, you should paste this code eather under $navbar or <!-- end what's going on box -->. The code you need to paste is: Code:
All done. I know you like it - https://vborg.vbsupport.ru/ ;) Here's the live demo and some screenshots: |
my logo is just like here....top and to the left.... how would i put the pics to the right of the logo and and will it work with 3.6 ?
thx |
Hi,
great hack. Installed! and yes it works fully with 3.6.0 as im running it there. Just a question, what if i want to display those random pics code under forumnav, but on ALL FORUMS not just FORUMHOME, then which template should i modify |
another question:
what if i want to open the thumbnail pics in a "new" window ? which lines do i modify in coppermine.php for that |
works great ............. thanks a lot for that love it ...
|
Quote:
:D |
Quote:
If you want to open the pics in a new window, just open the coppermine.php file, find the line: $copphotos.='<td><a target = "_parent" and replace it with: $copphotos.='<td><a target = "_blank" That should do the trick ;) |
OOPS - I MAY HAVE MISREAD THE QUESTION HERE - I THOUGHT YOU WANTED TO OPEN THE THUMBNAILS INSTEAD OF THE PHOTO , SORRY ... WELL THIS IS HOW THAT IS DONE ANYWAY :s
Quote:
Im not sure why you would want to do this , and i checked the codes on it - the amount of recoding would be huge if you wanted to make the thumbnail display instead of the image since coppermine isnt even set up to show a single thumbnail on its own. That being said ... if you change some of the code in coppermine.php from this : Find Code:
$copphotos.='<td><a target = "_parent" href="' . $coppath . '/displayimage.php?album=' . $albumid . Code:
$copphotos.='<td><a target = "_parent" href="' . $coppath . '/thumbnails.php?album=' . $albumid .'"><IMG SRC="' . $coppath . '/albums/' . $MZrow['filepath'].thumb_.$MZrow['filename'] .'" alt=' . $MZrow['filename'] . ' '. 'border=0 |
Indeed.
You got two resonable answers and modifications - I hope you got what you were asking for ;) |
why the thumbnails in forum home are much smaller than the thumbs in coppermine home and how to fix this ?
|
i found a bug. it displays thumbs for uploaded pics that ARENT approved yet by the admin. any fix ?
|
Quote:
|
Yes they are sure - the coppermine.php script isnt set to check for approvals , it just randomly checks all the files. Luckily i have a fix for that if you wish
change the code in coppermine.php line 27 from Code:
$MZresult = @mysql_query("SELECT * FROM ".$prefix."_pictures ORDER BY RAND() LIMIT 0,$amount"); Code:
$MZresult = @mysql_query("SELECT * FROM ".$prefix."_pictures WHERE approved='YES' ORDER BY RAND() LIMIT 0,$amount"); Anyone with VBadvanced , you can get the module for it here : https://vborg.vbsupport.ru/showthread.php?t=119432 |
Bug fixed. Thanks Tazie! ;)
I replaced the coppermine.php file. Everyone that installed this mod can download the new version now. |
Does anyone know how to port this for VB3.6.3 ?? I've tried to put this on my forum and get this error.
Quote:
|
Martin - only spotted this now - where exactly did you put this , and where does that error appear ? Is coppermine running ok on its own ?
A little more info is required to get this going please... |
Quote:
|
Quote:
in the line that says Code:
$copphotos.='<td><a target = "_parent" href="' . $coppath . '/displayimage.php?album=' . $albumid . |
I've installed this (thanks!) and it runs fine, but I'd love to get it to display in the left hand column. Any chance of that?
|
just paste the code into the right hand column tempate instead of forumhome and do the rest the same.
You want a <br> in somewhere to drop it down a line each time , but i dont have that hack so im not sure |
I tried that DjTaz, it just won't load. Worked fine in forumhome though.
|
Is it possible to display the user pictures instead of random pictures
|
Yes , its possible to display just the users gallery if you want that - i have that done in the members profiles when you go to a members profile page near the bottom.
http://www.theotherzone.com/member.php?u=1 is something like what you want ?? Or do you want a that persons gallery to display on the page when they enter ? The problem i see with that is no one gets to see anyone elses gallery, which defeats the purpose of it |
Quote:
Quote:
|
Hi, thanks for this mod, but I am having a problem.
I have edited the coppermine.php file with the following and uploaded to forum root. My coppermine folder is called photoalbum and is in the ame location as my forum folder. Code:
$coppath = "/photoalbum/"; // Path to the gallery from the coppermine.php file I have edited and uploaded the index.php file as follows: Code:
// ######################### REQUIRE BACK-END ############################ When I try to return to my forum I get a blank page with the message "Unable to connect to the database server at this time." I am assuming that this is because there is an error with either the hostname, db login or db password. I copied and pasted the login and password directly from the MySQL admin panel provided by my host so I am assuming the problem is with hostname. Any suggestions would be appreciated please. |
is the prefix correct ?
|
Hmm, well I changed it and now at least I can get into the forum with no error message and I see the table below the navbar with "Gallery" in the top left corner but no images appear.
Thanks |
You still looking to port this to 3.6.3 or have you moved up a level since ? Im only going back over the old threads now :S
|
Hi,
im not really good at coding.. but I want all my random pictures to display on a Ajax page can you please help me modify this code. Original Code:
echo('<a target = "_new" href="' . $copperminepath . '/displayimage.php?album=' . $albumid . Code:
<a href="#" onClick="ajaxwin=dhtmlwindow.open('ajaxbox', 'ajax', 'picture-path.htm', 'Ajax Win Title', 'width=650px,height=400px,left=300px,top=100px,resize=0,scrolling=1'); return false"> Thank you. Andres Carvajal http://www.simplementetodo.com |
Has anyone updated this for 4.0 at all :)
|
I am taking it this is a no.. :)
I don't get the changes... and not being at all php literate... I am out of my comfort zone |
All times are GMT. The time now is 04:59 PM. |
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:
|