PDA

View Full Version : Module VbAdvanced: Coppermine Random photos


DjTaz
06-22-2006, 10:00 PM
EDIT* Ryans has made this a little more simple on post https://vborg.vbsupport.ru/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 :



<script type="text/javascript">
<!--
function log_out()
{
ht = document.getElementsByTagName("html");
ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grays cale=1)";
if (confirm('$vbphrase[sure_you_want_to_log_out]'))
{
return true;
}
else
{
ht[0].style.filter = "";
return false;
}
}
//-->
</script>

<br />

<!-- breadcrumb, login, pm info -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="alt1" width="100%">
<if condition="is_array($navbits)">
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="bottom">
<td><a href="#" onclick="history.back(1); return false;"><img src="$stylevar[imgdir_misc]/navbits_start.gif" alt="$vbphrase[go_back]" border="0" /></a></td>
<td>&nbsp;</td>
<td width="100%"><span class="navbar"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb]</td>
</tr>
<tr>
<td class="navbar" style="font-size:10pt; padding-top:1px" colspan="3"><a href="$scriptpath"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink.gif" alt="$vbphrase[reload_this_page]" border="0" /></a> <strong>$navbits[lastelement]</strong></td>
</tr>
</table>
<else />
<div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
</if>
</td>

<if condition="$show['member']">

<td class="alt2" valign="top" nowrap="nowrap">
<div class="smallfont">
<strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />
<phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase>
<if condition="$show['pmstats']"><br /><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl_q]">$vbphrase[private_messages_nav]</phrase></if>
</div>
</td>

<else />

<td class="alt2" nowrap="nowrap" style="padding:0px">

<!-- login form -->
<form action="login.php" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, $show[nopasswordempty])">
<script type="text/javascript" src="clientscript/vbulletin_md5.js"></script>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td class="smallfont"><label for="navbar_username">$vbphrase[username]</label></td>
<td><input type="text" class="bginput" style="font-size: 11px" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="$vbphrase[username]" onfocus="if (this.value == '$vbphrase[username]') this.value = '';" /></td>
<td class="smallfont" colspan="2" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" />$vbphrase[remember_me]</label></td>
</tr>
<tr>
<td class="smallfont"><label for="navbar_password">$vbphrase[password]</label></td>
<td><input type="password" class="bginput" style="font-size: 11px" name="vb_login_password" id="navbar_password" size="10" accesskey="p" tabindex="102" /></td>
<td><input type="submit" class="button" value="$vbphrase[log_in]" tabindex="104" title="$vbphrase[enter_username_to_login_or_register]" accesskey="s" /></td>
</tr>
</table>
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="login" />
<input type="hidden" name="vb_login_md5password" />
<input type="hidden" name="vb_login_md5password_utf" />
</form>
<!-- / login form -->

</td>

</if>

</tr>
</table>
<!-- / breadcrumb, login, pm info -->

<!-- nav buttons bar -->
<div align="center">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center">
<if condition="$show['member']">
<td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
</if>
<if condition="$show['registerbutton']">
<td class="vbmenu_control"><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td>
</if>
<td class="vbmenu_control"><a href="faq.php$session[sessionurl_q]" accesskey="5">$vbphrase[faq]</a></td>
<td class="vbmenu_control"><a href="memberlist.php$session[sessionurl_q]">$vbphrase[members_list]</a></td>
<td class="vbmenu_control"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>
<if condition="$show['popups']">
<if condition="$show['searchbuttons']">
<if condition="$show['member']">
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
</if>
<td id="navbar_search" class="vbmenu_control"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[search]</a> <script type="text/javascript"> vbmenu_register("navbar_search"); </script></td>
</if>
<if condition="$show['member']">
<td id="usercptools" class="vbmenu_control"><a href="$show[nojs_link]#usercptools">$vbphrase[quick_links]</a> <script type="text/javascript"> vbmenu_register("usercptools"); </script></td>
</if>
<else />
<if condition="$show['searchbuttons']">
<td class="vbmenu_control"><a href="search.php$session[sessionurl_q]" accesskey="4">$vbphrase[search]</a></td>
<if condition="$show['member']">
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
</if>
</if>
<td class="vbmenu_control"><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a></td>
<if condition="$show['member']">
<td class="vbmenu_control"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&amp;focus=1','buddylist','statusbar=no,me nubar=no,toolbar=no,scrollbars=yes,resizable=yes,w idth=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td>
</if>
</if>
<if condition="$show['member']">
<td class="vbmenu_control"><a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]" onclick="return log_out()">$vbphrase[log_out]</a></td>
</if>
</tr>
</table>






<!-- / COPPERMINE GALLERY -->
<br>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class='tcat' colspan='0' align=left>
<span class='smallfont'>
<strong>&raquo; <a href='$coppath'>Gallery</a>
</strong></span></td>
</tr>

<tr>
<td class='alt1' width='100%' align-middle valign=middle>

$copphotos
</td></tr></table>
<!-- / COPPERMINE GALLERY -->









</div>
<!-- / nav buttons bar -->

<br />
<if condition="$show['forumdesc']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="alt1" width="100%"><strong>$foruminfo[title]</strong> <span class="smallfont">$foruminfo[description]</span></td>
</tr>
</table>
<br />
</if>

<if condition="$show['popups']">
<!-- NAVBAR POPUP MENUS -->

<if condition="$show['searchbuttons']">
<!-- header quick search form -->
<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$vbphrase[search_forums]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="search.php" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="showposts" value="0" />
<input type="hidden" name="quicksearch" value="1" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="text" class="bginput" name="query" size="20" />&nbsp;$gobutton<br />
</form>
</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
</tr>
</table>
</div>
<!-- / header quick search form -->
</if>

<if condition="$show['member']">
<!-- user cp tools menu -->
<div class="vbmenu_popup" id="usercptools_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">

<tr><td class="thead">$vbphrase[quick_links]</td></tr>
<if condition="$vboptions['enablesearches']"><tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily">$vbphrase[todays_posts]</a></td></tr></if>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]do=markread">$vbphrase[mark_forums_read]</a></td></tr>
<tr><td class="vbmenu_option"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&amp;focus=1','buddylist','statusbar=no,me nubar=no,toolbar=no,scrollbars=yes,resizable=yes,w idth=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td></tr>

<tr><td class="thead"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_control_panel]</a></td></tr>
<if condition="$show['siglink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editsignature">$vbphrase[edit_signature]</a></td></tr></if>
<!--<if condition="$show['avatarlink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editavatar">$vbphrase[edit_avatar]</a></td></tr></if>-->
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editprofile">$vbphrase[edit_profile]</a></td></tr>
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td></tr>

<tr><td class="thead">$vbphrase[miscellaneous]</td></tr>
<if condition="$show['pmstats']"><tr><td class="vbmenu_option"><a href="private.php$session[sessionurl_q]" rel="nofollow">$vbphrase[private_messages]</a></td></tr></if>
<tr><td class="vbmenu_option"><a href="subscription.php$session[sessionurl_q]" rel="nofollow">$vbphrase[subscribed_threads]</a></td></tr>
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[my_profile]</a></td></tr>
<if condition="$show['wollink']"><tr><td class="vbmenu_option"><a href="online.php$session[sessionurl_q]">$vbphrase[whos_online]</a></td></tr></if>

</table>
</div>
<!-- / user cp tools menu -->
</if>
<!-- / NAVBAR POPUP MENUS -->

<!-- PAGENAV POPUP -->

<div class="vbmenu_popup" id="pagenav_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead" nowrap="nowrap">$vbphrase[go_to_page]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="$vboptions[forumhome].php" method="get" onsubmit="return this.gotopage()" id="pagenav_form">
<input type="text" class="bginput" id="pagenav_itxt" style="font-size:11px" size="4" />
<input type="button" class="button" id="pagenav_ibtn" value="$vbphrase[go]" />
</form>
</td>
</tr>
</table>
</div>

<!-- / PAGENAV POPUP -->
</if>



NEXT CLICK INSTALL - JUST SO YOU DONT FORGET - BUT THERES MORE TO DO

https://vborg.vbsupport.ru/images/smoothblue/buttons/installed.gif (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&amp;threadid=1194 32)


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');

require_once('coppermine.php');


And thats it - You should have some random images on your VbAdvanced homepage.

Snake
06-23-2006, 11:45 AM
Thankies...

topsoftware
06-23-2006, 12:22 PM
hi
where can i crate template

Create a template called
adv_portal_navbar_with_gallery
with the following code :

Shredder5655
06-23-2006, 01:41 PM
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

DjTaz
06-23-2006, 01:59 PM
Ohh sorry guys - in the adminCP - styles and templates - add a template - and use the text that i put there.

anyone clicking INSTALL ???

DjTaz
06-23-2006, 02:07 PM
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.

DjTaz
06-23-2006, 05:50 PM
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
06-23-2006, 06:01 PM
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..

DjTaz
06-23-2006, 06:48 PM
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.

Veer
06-24-2006, 10:44 PM
Installed, Thanks :)

DjTaz
06-24-2006, 10:58 PM
Well at least someone clicked INSTALL !! thanks :D

gonecountry
08-15-2006, 01:14 PM
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.

DjTaz
08-15-2006, 04:21 PM
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

//***********************************//
// ** SETTINGS ** //
//***********************************//

$coppath = "gallery"; // Path to the gallery from the coppermine.php file
$hostname = "localhost"; // The Coppermine hostname - usually localhost
$username = ""; // Coopermine Database Username
$copperpass= ""; // Password to the Coppermine Database
$copperdb= ""; // Coppermine Database
$prefix= "cpg148"; // Coppermine Prefix (sometimes cpg133 , or cpg11d)
$amount= "6"; // Amount of photos to select

//***********************************//
//***********************************//


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
08-15-2006, 05:41 PM
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

DjTaz
08-15-2006, 07:30 PM
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)
08-15-2006, 07:44 PM
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...............

DjTaz
08-15-2006, 07:59 PM
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.


<!-- / COPPERMINE GALLERY -->
<br>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class='tcat' colspan='0' align=left>
<span class='smallfont'>
<strong>&raquo; <a href='$coppath'>Gallery</a>
</strong></span></td>
</tr>

<tr>
<td class='alt1' width='100%' align-middle valign=middle>

$copphotos
</td></tr></table>
<!-- / COPPERMINE GALLERY -->

Feckie (Roger)
08-15-2006, 08:37 PM
Yep thanks that worked a treat.....................Clicks install..

gonecountry
08-15-2006, 09:32 PM
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.

DjTaz
08-16-2006, 05:15 AM
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.

AcidX
08-16-2006, 11:51 AM
DjTaz, you d' man! :-)
But if it doesn't work, better watch out! ;)

Nice mod.
* AcidX clicks install.

AcidX
08-16-2006, 12:57 PM
Erm... I'm using 3.5.0, but I guess it doesn't work on that version, right?

vBAdvanced?

DjTaz
08-16-2006, 05:23 PM
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 ?

AcidX
08-16-2006, 08:27 PM
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.

DjTaz
08-16-2006, 08:37 PM
Well the modules are usually only for VBA yes

If you put this under $navbar in your FORUMHOME template ..



<!-- / COPPERMINE GALLERY -->
<br>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class='tcat' colspan='0' align=left>
<span class='smallfont'>
<strong>&raquo; <a href='$coppath'>Gallery</a>
</strong></span></td>
</tr>

<tr>
<td class='alt1' width='100%' align-middle valign=middle>

$copphotos
</td></tr></table>
<!-- / COPPERMINE GALLERY -->



and then add

require_once('coppermine.php');

into your index.php as directed in the main instructions and upload the coppermine.php file into your root it should work (thats untested)

AcidX
08-17-2006, 01:54 PM
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 require_once('coppermine.php'); 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? ;)

AcidX
08-19-2006, 12:44 PM
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
08-21-2006, 05:51 AM
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.

DjTaz
08-21-2006, 05:36 PM
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
08-21-2006, 06:00 PM
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

AcidX
08-21-2006, 06:20 PM
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
08-21-2006, 11:16 PM
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
09-24-2006, 05:14 PM
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!

DjTaz
09-24-2006, 07:04 PM
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 ..




<br>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class='tcat' colspan='0' align=left>
<span class='smallfont'>
<strong>&raquo; <a href='$coppath'>Gallery</a>
</strong></span></td>
</tr>

<tr>
<td class='alt1' width='100%' align-middle valign=middle>

$copphotos
</td></tr></table>




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
09-25-2006, 01:34 AM
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
11-28-2006, 10:38 AM
I'm having a problem, nstalled everything to the letter but i'm getting the navigation bar with the pictures inside

TheWhite
11-28-2006, 12:12 PM
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
01-19-2007, 09:03 PM
Can and if so how is the thumbnail dimensions changed. Its working fine on 3.6.4 but thumbnails are bit small.

DjTaz
01-20-2007, 10:31 AM
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
01-23-2007, 10:39 AM
Thank you

andres28
02-15-2007, 06:57 PM
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?

DjTaz
02-16-2007, 05:41 AM
I believe if u change


$copphotos.='<td><a target = "_parent" href="' . $coppath . '/displayimage.php?album=' . $albumid .
'&pos=-' . $pos . '"><IMG SRC="' . $coppath . '/albums/' . $MZrow['filepath'].thumb_.$MZrow['filename'] .'" alt=' . $MZrow['filename'] . ' '. 'border=0
height='.$height.'>' . '</a><b><br><font size=1>Uploader :</b><br><a href="member.php?u=' . $MZrow['owner_id'] . '"> ' . $MZrow['owner_name'] . '</a><br><font size=1> ' .$ctime. ' </td>';
}


to


if ($albumid!=12345) {

$copphotos.='<td><a target = "_parent" href="' . $coppath . '/displayimage.php?album=' . $albumid .
'&pos=-' . $pos . '"><IMG SRC="' . $coppath . '/albums/' . $MZrow['filepath'].thumb_.$MZrow['filename'] .'" alt=' . $MZrow['filename'] . ' '. 'border=0
height='.$height.'>' . '</a><b><br><font size=1>Uploader :</b><br><a href="member.php?u=' . $MZrow['owner_id'] . '"> ' . $MZrow['owner_name'] . '</a><br><font size=1> ' .$ctime. ' </td>';
}
}

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
06-05-2007, 01:01 PM
I installed Coppermine using Fantastico. So I don't know about the password. What can do about it?

DjTaz
06-05-2007, 07:46 PM
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-06-2007, 01:10 AM
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
06-09-2007, 01:16 AM
No remedy?

kobescoresagain
06-19-2007, 12:45 PM
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.


$MZrow['filename'] = str_replace('#', '%23', $MZrow[filename]);

ryans
06-25-2007, 04:09 AM
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


<!-- / COPPERMINE GALLERY -->
<br>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class='tcat' colspan='0' align=left>
<span class='smallfont'>
<strong>&raquo; <a href='$coppath'>Gallery</a>
</strong></span></td>
</tr>

<tr>
<td class='alt1' width='100%' align-middle valign=middle>

$copphotos
</td></tr></table>
<!-- / COPPERMINE GALLERY -->



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
<tr><td> and </td></tr>

you can just cut and paste lines 30 through 40


$copphotos.='<tr><td><table border=0 cellpadding=20 cellspacing=0><tr>';

while ( $MZrow = mysql_fetch_array($MZresult) ) {

$pos = $MZrow['pid'];
$ctime = date ("d-m-Y" ,$MZrow['ctime']);

$copphotos.='<td><a target = "_parent" href="' . $coppath . '/displayimage.php?album=' . $albumid . '&pos=-' . $pos . '"><IMG SRC="' . $coppath . '/albums/' . $MZrow['filepath'].thumb_.$MZrow['filename'] .'" alt=' . $MZrow['filename'] . ' '. 'border=0 >' . '</a><b><br><font size=1>Uploader :</b><br><a href="member.php?u=' . $MZrow['owner_id'] . '"> ' . $MZrow['owner_name'] . '</a><br><font size=1> ' .$ctime. ' </td>';
}

$copphotos.='</tr></table></td></tr>';

joeyhavlock
07-17-2007, 09:22 PM
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

DjTaz
07-17-2007, 09:37 PM
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 :

$MZresult = @mysql_query("SELECT * FROM ".$prefix."_pictures WHERE owner_id=".$userinfo[userid]." ORDER BY RAND() LIMIT 0,$amount");
if (!$MZresult) { die('<p>Error performing query: ' . mysql_error() .'</p>'); }

DjTaz
07-18-2007, 12:04 AM
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
$copphotos



use this instead :



<!!!!!!! added in !!!!!!!!!!!!!>
<if condition="$gallphotos>6">
<!-- Scroller Javascripts -->
<SCRIPT language=JavaScript type=text/javascript>
var richtung=1;
var scroll_step=15;
var scroll_timeout=30;
var scroll_max=0;

function dummy() {}

function scroll(trichtung,tscroll_max) {
richtung=trichtung;
scroll_max=tscroll_max;

scrolllauf(richtung,scroll_max);
if (richtung != 3) {
setTimeout('scroll(richtung,scroll_max);',scroll_t imeout)
}
}

function scrolllauf(trichtung,tscroll_max) {
if (document.layers) {
inhaltObj=document.layers["l_fenster"].layers["l_gallerie"];
}
else {
inhaltObj=document.getElementById("gallerie").style;
}
position=parseInt(inhaltObj.left);
if (richtung==0) {
if (position<0) {
inhaltObj.left=Math.min(position+scroll_step,0);
}
}
if (richtung==1) {
if (position>-scroll_max) {
inhaltObj.left=Math.max(position-scroll_step,-scroll_max);
}
}
}

function stop() {
richtung=3;
}
//-->
</SCRIPT>





<TABLE border=0 cellPadding=0 cellSpacing=0 height=140 >
<TBODY>
<TR>
<TD><A href="javascript:dummy()" onmouseout=stop()
onmouseover=scroll(0,2900)><IMG border=0 height=20 src="images/leftarrow.gif" width=20></A>
<IMG border=0 height=0 src="images/rightarrow.gif" width=0>
</TD>

<TD width=100% align=center>
<SCRIPT language=JavaScript type=text/javascript>
<!--
if (document.layers){document.write('<ILAYER id="l_fenster" width="100%" height="160" clip="0,0,600,140" & z-index="1"><LAYER id="l_gallerie" width="100%" height="140" z-index="1">')}
else {document.write('<DIV id=fenster style="HEIGHT: 140px; OVERFLOW: hidden; POSITION: relative; WIDTH: 700px"><DIV id=gallerie style="HEIGHT: 140px; LEFT: 0px; POSITION: absolute; WIDTH: 700px">')}
//-->
</SCRIPT>
</if>

$copphotos




<if condition="$gallphotos>6">
<SCRIPT language=JavaScript type=text/javascript>
<!--
if (document.layers){document.write('</LAYER></ILAYER>')}
else {document.write('</DIV></DIV>')}
//-->
</SCRIPT>
</TD>
<TD><A href="javascript:dummy()" onmouseout=stop()
onmouseover=scroll(1,1200)><IMG border=0 height=20 src="images/rightarrow.gif" width=20></A>
</TD>
</TR>
</TABLE>
</if>
<!!!!!!! end added in !!!!


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
04-13-2008, 12:39 PM
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