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


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

$copphotos

use this instead :
Code:



<!!!!!!! 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_timeout)
        }
}

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


All times are GMT. The time now is 01:02 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
  • Page Generation 0.01296 seconds
  • Memory Usage 1,762KB
  • 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
  • (9)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (12)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