vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Coppermine Random Photos on vBulletin FORUMHOME (easy) (https://vborg.vbsupport.ru/showthread.php?t=124398)

AcidX 08-18-2006 10:00 PM

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');
(save the changes > upload the file in the forum root)


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:


<!-- / 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 -->

(Save the template.)



All done.
I know you like it - https://vborg.vbsupport.ru/ ;)

Here's the live demo and some screenshots:

hgb 08-19-2006 06:29 PM

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

Selene 08-19-2006 09:14 PM

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

Selene 08-19-2006 09:33 PM

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

Barakat 08-20-2006 03:53 AM

works great ............. thanks a lot for that love it ...

DjTaz 08-20-2006 11:40 AM

Quote:

Originally Posted by Selene
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

If you want this hack to work on all the areas , just put the code into NAVBAR instead of FORUMHOME at the very bottom - that should do the trick for you.

:D

AcidX 08-20-2006 11:53 AM

Quote:

Originally Posted by Selene
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

Thanks for installing.
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 ;)

DjTaz 08-20-2006 12:11 PM

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:

Originally Posted by Selene
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


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 .
'&pos=-' . $pos . '"><IMG SRC="' . $coppath . '/albums/' . $MZrow['filepath'].thumb_.$MZrow['filename'] .'" alt=' . $MZrow['filename'] . ' '. 'border=0
height=60>' . '</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>';
}

and change to

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
height=60>' . '</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>';
}

it should bring you to that users thumbnail page instead of to the photo itself

AcidX 08-21-2006 02:18 PM

Indeed.
You got two resonable answers and modifications - I hope you got what you were asking for ;)

Konstantinos 09-27-2006 03:50 PM

why the thumbnails in forum home are much smaller than the thumbs in coppermine home and how to fix this ?


All times are GMT. The time now is 07: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
  • Page Generation 0.01239 seconds
  • Memory Usage 1,749KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete