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)
-   -   Module VbAdvanced: Coppermine Random photos (https://vborg.vbsupport.ru/showthread.php?t=119432)

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
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='.$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

Code:

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.


PHP Code:

$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

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


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:

<tr><td>
and
Code:

</td></tr>
you can just cut and paste lines 30 through 40

Code:

$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 :
Code:

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



All times are GMT. The time now is 10:37 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.01156 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
  • (7)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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