View Full Version : Module VbAdvanced: Coppermine Random photos
EDIT* Ryans has made this a little more simple on post http://www.vbulletin.org/forum/showpost.php?p=1275859&postcount=48 so if anyone wants this addition with less scripting , his way is a little easier
Uploads : 1
Template Additions : 1
File Changes : 1 (and re-upload)
Requirements : Coppermine Photo Gallery Installed.
This was something i wanted on my VBa for ages , but i couldnt see anyone doing anything like this , so i went ahead and did it myself !
Change the database info on the coppermine.php and upload it to your forum root.
Create a template called
adv_portal_navbar_with_gallery
with the following code :
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
NEXT CLICK INSTALL - JUST SO YOU DONT FORGET - BUT THERES MORE TO DO
http://www.vbulletin.org/forum/images/smoothblue/buttons/installed.gif (http://www.vbulletin.org/forum/vborg_miscactions.php?do=installhack&threadid=119432)
open your VBA index file (i renamed mine to index.php , but you may have a different name on it) and add this line in under the
require_once('./global.php');
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
And thats it - You should have some random images on your VbAdvanced homepage.
topsoftware
23 Jun 2006, 14:22
hi
where can i crate template
Create a template called
adv_portal_navbar_with_gallery
with the following code :
Shredder5655
23 Jun 2006, 15:41
Having trouble creating a template as well. I saved one in DreamWeaver as .XML, and it just kept on giving me error after error in uploading.
When I tried to view it, I get
Error performing query: Table 'DBName.cpg148_pictures' doesn't exist
Ohh sorry guys - in the adminCP - styles and templates - add a template - and use the text that i put there.
anyone clicking INSTALL ???
Having trouble creating a template as well. I saved one in DreamWeaver as .XML, and it just kept on giving me error after error in uploading.
When I tried to view it, I get
Error performing query: Table 'DBName.cpg148_pictures' doesn't exist
Firstly - have you got Coppermine Photo Gallery Installed ?
Secondly - if so what version are you using ? - in the coppermine.php file theres a prefix for the coppermine database - if you dont have 1.4.8 installed then change it to cpg133 or cpg11d as these are other versions (check your sql database for the prefix if needs be)
Thirdly - this will take random photos that members have uploaded out of the coppermine database and put them as photos on your main page for Vbadvanced - it wont work with any other gallery.
If you need me to take a look at your site i can do that, just link me and ill take a peek for you.
Ive updated the template as i had the navbar template i was using on my own site with the hacks installed - so the navbar template thats there now is a new default one
Shredder5655
23 Jun 2006, 20:01
Whoops! I didn't see that part, I just went on to the description of instillation!
After having a look at the program, that's not really what I was looking for. What I was looking for was a program that posted pictures of new members on the main page. There would be an area for members to upload personal photos for all to see, mostly staring them, and then the script would randomly pick those images and display them on the main page, showing folks there is alot of board activitiy..
I'll take a look at a script that randomly displays members pictures in a few days if i get time , in the meantime i'd recommend you post that in the requests section of the boards in case someone else is working on something like that.
Well at least someone clicked INSTALL !! thanks :D
gonecountry
15 Aug 2006, 15:14
Confused onthe coppermine.php instructions. Do I override the existing coppermine.php, if one exist or is this a newone??
Also not sure what username and passwords you are asking for the admin ones???
Sorry I've never change or add db info like this.
Thanks for the help.
heya gonecountry ... you shouldnt have a coppermine.php in your forum root , unless you put the coppermine gallery in the same folder as the forums ..
Basically if your forums on your ftp is /www/forums/index.php ... you put the php file into /www/forums/coppermine.php
BEFORE you upload it to your ftp - change this info in the coppermine.php file
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
so that it reflects the info for your own database - i have my coppermine in the same database as my forums so i need the prefix to seperate them.
Let me know if you still need help - if your really stuck ill do it for you once you have coppermine working and VBB working ok first.
gonecountry
15 Aug 2006, 19:41
OK I thought I hadn it but I missed something......
http://www.mommiesplayground.com/
Please take a look if you could and tell me what I missed Thanks
I cant see the modules as a guest , i need a user and pass to be able to log in and see it
Feckie (Roger)
15 Aug 2006, 21:44
Is it possible to have this just as a stand alone module , without the navbar.
Reason I ask is that I have a custon navbar...............
Is it possible to have this just as a stand alone module , without the navbar.
Reason I ask is that I have a custon navbar...............
Yeah - instead of the code in the box above - copy your custom navbar code and put this into a new template called adv_portal_navbar_with_gallery under it add the following , it should work, but may need some playing about with depending on the template.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Feckie (Roger)
15 Aug 2006, 22:37
Yep thanks that worked a treat.....................Clicks install..
gonecountry
15 Aug 2006, 23:32
I just checked the usergroups and somehow it was not allowing. You should be able to view now. I think it has t odo with the php file I must not be putting in the correct info.
It looks like you have the alternative navigation menu option selected in the Vbulletin VBA options in the admin panel.
Im not 100% sure on that, but i think thats the issue - try using the normal navigation bar and see if it works then.
DjTaz, you d' man! :-)
But if it doesn't work, better watch out! ;)
Nice mod.
/me clicks install.
Erm... I'm using 3.5.0, but I guess it doesn't work on that version, right?
vBAdvanced?
Erm... I'm using 3.5.0, but I guess it doesn't work on that version, right?
vBAdvanced?
Im using 3.5.0 myself and VBA 2.1 (i think) - it should work ok on that.
Want me to take a look for you ?
I'm using plain vBulletin 3.5.0 (with a few mods installed). I'm not using VBA.
Does this module work only with VBA?
Is there any way I can install it on my forum?
btw, the url is http://forum.kajgana.com/
Thanks, I really appreciate it.
Well the modules are usually only for VBA yes
If you put this under $navbar in your FORUMHOME template ..
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
and then add
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
into your index.php as directed in the main instructions and upload the coppermine.php file into your root it should work (thats untested)
So basically, all I need to do is:
1) Modify and upload the coppermine.php file in the forum root directory.
2) Put the code you gave me under $navbar in FORUMHOME
3) Add
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
in my index.php under require_once('./global.php');.
Do I have to create a template called adv_portal_navbar_with_gallery, or the three steps above are enough? ;)
It works, kinda...
Take a look at the screenshot
52294
As you can notice, I get the date, and the picture/author info - but there are no pictures listed.
Any ideas?
EDIT:
I had the wrong coppermine prefix. Replaced cpg133 with cpg135x and it worked!
Thank you ;)
52296
JenniferK
21 Aug 2006, 07:51
I'm not really sure what I should be putting for the "path to the gallery from the coppermine.php file" I changed things a bit: I put the coppermine.php file in my modules folder because I want it as a stand-alone module lower on my home page rather than under the navbar. I changed the template accordingly.
My homepage is: mysite.com/forum/home.php
My gallery is: mysite.com/gallery/index.php
the coppermine.php file is: mysite.com/forum/modules/coppermine.php
I tried playing around with it a bit, but I keep getting the Unable to locate the picture database at this time error message.
your PATH TO GALLERY is back 2 folders and forward one ... so
../../gallery
that should do it for you, if not let me know the site and ill take a look.
JenniferK
21 Aug 2006, 20:00
Do you mean exactly like that:
../../gallery
As in if I cut and paste that it should work? Because now I'm getting this error: Warning: main(coppermine.php) [function.main]: failed to open stream: No such file or directory in /home.php on line 43
Fatal error: main() [function.require]: Failed opening required 'coppermine.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/huntley/public_html/forum/home.php on line 43
I'm not really sure what I should be putting for the "path to the gallery from the coppermine.php file" I changed things a bit: I put the coppermine.php file in my modules folder because I want it as a stand-alone module lower on my home page rather than under the navbar. I changed the template accordingly.
My homepage is: mysite.com/forum/home.php
My gallery is: mysite.com/gallery/index.php
the coppermine.php file is: mysite.com/forum/modules/coppermine.php
I tried playing around with it a bit, but I keep getting the Unable to locate the picture database at this time error message.According to the info you provided, you need to set the value to "gallery". That should do the trick. ;)
JenniferK
22 Aug 2006, 01:16
According to the info you provided, you need to set the value to "gallery". That should do the trick. ;)
That is the first thing I tried....
JenniferK
24 Sep 2006, 19:14
OK, I am almost ready to open my board, so I have come back to this. :) I have figured out most of the problem I was having, and now I can get it to display, but what it is doing is replacing my navbar with this module. I figured out that is due to this line:
eval('$navbar.= "' . fetch_template('adv_portal_gallery') . '";');
at the end of the php file. When I take that line out, nothing displays at all. I'm not sure what I need to replace this with to get it to work properly. I would really appreciate your help on this. Thanks!
OK, I am almost ready to open my board, so I have come back to this. :) I have figured out most of the problem I was having, and now I can get it to display, but what it is doing is replacing my navbar with this module. I figured out that is due to this line:
eval('$navbar.= "' . fetch_template('adv_portal_gallery') . '";');
at the end of the php file. When I take that line out, nothing displays at all. I'm not sure what I need to replace this with to get it to work properly. I would really appreciate your help on this. Thanks!
Jennifer , the eval is the part that evaluates the page so without that your always going to get a blank page. Because i assume you have edited the look and theme of your page try this
make a template called adv_portal_navbar_with_gallery
Copy your Navbar code into this template , and under it copy the following code ..
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
That should display your navbar and then the gallery under it - if you still have problems , ill take a look at your code for you.
JenniferK
25 Sep 2006, 03:34
Thanks for the quick reply :)
I'm sorry though I should have specified (I mentioned this on the previous page, but I was asking about a different problem and it was a month ago anyway). I put the coppermine.php file in my modules folder because I want it as a stand-alone module lower on my home page rather than under the navbar. So I changed the template accordingly. That is all fine. I just need to know what the eval line should be changed to so that it works for the individual module rather than the navbar.
TheWhite
28 Nov 2006, 12:38
I'm having a problem, nstalled everything to the letter but i'm getting the navigation bar with the pictures inside
TheWhite
28 Nov 2006, 14:12
I've installed coperrmine, i've done evrything in this guide to the letter at least 5 times but there's no way i can get th pictures to show, the only thing that i didn't do but then again i never did is click the install button because i don't have permission(?!?) can some contact me in MSN: hunk4004@yahoo.com and just give me that final push for getting this to work, i'm willing to pay but an honest price since there's not much to do.
regards
Icehawk002
19 Jan 2007, 23:03
Can and if so how is the thumbnail dimensions changed. Its working fine on 3.6.4 but thumbnails are bit small.
I have added a height option to this coppermine.php - this should allow you to adjust the height of the thumbnails if you wish to do so.
I may work on a scrolling coppermine window if i get time soon enough - need to sort my laptop as wellas i cant do much work with it at present.
Icehawk002
23 Jan 2007, 12:39
Thank you
andres28
15 Feb 2007, 20:57
Okay I have install this hack and it works fine, but I my problem is... I have a folder with some xxx pics and I dont want this pic from this folder to be display on the random pictures is there any way to fix this, or to tell the scrip not to look in some albums or to look only in some albums?
I believe if u change
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
to
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
where 12345= the album ID it should disallow that folder but i havent tested it.
Its a bit of a quick fix as it wont replace the xxx photos with anything else , so if theres 4 from that folder , you'll only end up with 1 being displayed.
Invalid ID
05 Jun 2007, 15:01
I installed Coppermine using Fantastico. So I don't know about the password. What can do about it?
I havent used fantastico , but im sure it asked you for some details when you were installing ?
If you FTP into the coppermine folder is there a config file you can check ?Its basically the same settings as the coppermine config login settings.
Invalid ID
06 Jun 2007, 03:10
If you install something using Fantastico, it never asks for mysql name, password and user name. It creates them automatically.
The user name and mysql name can be check by phpmyadmin. But you can't see the password.
Even in the config.php, there's no such information.
I have been looking for this Mod for so many months and now I got it, but this password problem will mar it.
Invalid ID
09 Jun 2007, 03:16
No remedy?
kobescoresagain
19 Jun 2007, 14:45
For anyone who had issues with the # sign messing up the images on the display just add the following to your coppermine.php page in the forum directory.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
You can make this a module.
Use this code for the template. The other code has his whole page on it, which was wrong.
adv_portal_navbar_with_gallery
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Edit this file i've attached and put in your path to the coppermine.php file in your forums root directory.
Then upload the file to forums/modules directory.
Remove the edit you made to the index.php file. That will cause a duplicate.
Add a new php module
module name - whatever you want
templates used: adv_portal_navbar_with_gallery
clean output : yes
If it comes out all screwy looking edit the coppermine.php file and add
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
and
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
you can just cut and paste lines 30 through 40
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
joeyhavlock
17 Jul 2007, 23:22
Hi,
I am very interested in using this mod for my system, with this is there any way I can target the coppermine album where the images are chosen from?
Thanks
Joey
Yes Joey you can ... i have this done on my own site in the memebrs profile where it only shows photos from that member .... http://www.theotherzone.com/taz is an example.
you just need to edit the section in coppermine.php to :
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
I have just made a small change to the options here if anyone wants to try it out ....
I use this in the members profile to list their photos , but it could be used on the main page as well
in the template edit, instead of
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
use this instead :
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
and you get a scrolling image ... -- upload the 2 arrows to the images directory and away you go.
This doesnt work with firefox as i discovered - if anyone can get a working version in firefox please let me know .... example : http://www.theotherzone.com/Taz
Icehawk002
13 Apr 2008, 14:39
Installed OK for 3.7.0 RC2 and Vba 3.0.
What do I add or change in the coppermine.php to enable pictures only from specified albums?
Thanks
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.