Coppermine Sidebar for Browsers!!! - Page 3 Coppermine Sidebar for Browsers!!! - Page 3
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Coppermine Sidebar for Browsers!!!

Started by Tarique Sani, May 12, 2004, 09:37:26 AM

Previous topic - Next topic

0 Members and 6 Guests are viewing this topic.

Joachim Müller

make sure you have unzipped the package properly, preserving the folder structure.

vangoga

Hi

I am using CPG 1.4.1, therefore
I made few modifications to make SIDEBAR work with CPG 1.4.1 beta

Need to fix these two functions in sidebar.php:


function get_subcat_data($parent, $ident = '')
{
    global $CONFIG, $catStr;
   
if ($parent == 0) {
     get_album_data($parent,$ident );
}
    $sql = "SELECT cid, name, description " . "FROM {$CONFIG['TABLE_CATEGORIES']} " . "WHERE parent = '$parent' " . "ORDER BY pos";
$result = cpg_db_query($sql);

    if (($cat_count = mysql_num_rows($result)) > 0) {
        $rowset = cpg_db_fetch_rowset($result);
        $pos = 0;
        foreach ($rowset as $subcat) {
      $catStr .= $ident."|".$subcat['name']."|index.php?cat=".$subcat['cid']." \n";
get_album_data($subcat['cid'], $ident . '.');
get_subcat_data($subcat['cid'], $ident . '.');
        }
    }
}

function get_album_data($category,$ident)
{
    global $CONFIG, $catStr,$ALBUM_SET;
$sql = "SELECT aid,title FROM {$CONFIG['TABLE_ALBUMS']} WHERE category = $category ".$ALBUM_SET;
$result = cpg_db_query($sql);

    if (($cat_count = mysql_num_rows($result)) > 0) {
        $rowset = cpg_db_fetch_rowset($result);
        foreach ($rowset as $subcat) {
$catStr .= $ident."|".$subcat['title']."|thumbnails.php?album=".$subcat['aid']."\n";
        }
    }
}


And also i found that there are no need for PEAR, but you need to comment out following lines in layersmenu-common.inc.php:


/**
* You need PEAR only if you want to use the DB support.
*/
//require_once "PEAR.php";
/**
* You need DB.php only if you want to use the DB support.
*/
//require_once "DB.php";

/**

delmarva

when i type in "http://www.mysite.com/gallery/sidebarInstall.php" it goes to the setup page and then when I choose which browser I would like, it goes to "http://www.mysite.com/coppermine/...." How do I change the "coppermine" to "gallery"?

delmarva

This is probably pretty simple for you guys. Please let me know. Thanks

Joachim Müller

as a first step, don't post a dummy url but an actual link to your page.

mini1400

#45
Silly question - What else is needed to get this to work?

I've downloaded the file from the first post, unzipped it to my coppermine installation, run install and all I get in the sidebar is the title of my gallery, nothing else....

http://mini1400.demon.co.uk/cpg/sidebarinstall.php

Any help greatfully received :)

Joachim Müller

did you read the readme file that comes with the package?

koch

not working iа last uploaded files got cyrrilic simbols in filename/

Example
REAL filename  - thumb_оранж.jpg
filename in URL  - thumb_%EE%F0%E0%ED%E6.jpg
filename in Sidebar - thumb_оранж.jpg (the same like REAL filename)

My gallery sidebar
http://mkruiz.ru/vitadibordo/sidebarInstall.php

florianbfr

Really super mod !! Work perfectly with CPG 1.4.2 and FireFox 1.5
thank you Tarique !

I'm newbie in PHP so i can't modify or create anythings but I may have some suggestions to modify your script to do :

1- In User Settings : add 2 textbox to enter User Name and PassWord, to send it to Coppermine when you open the sidebar
2- If user isn't registered or not login, is it possible to hide the Last Uploaded file if they come from users gallery or private gallery

Can you do it ? I'm interresting

(sorry for my english)

sava

I keep getting

"Fatal error: Call to undefined function: db_query() in /home/savabg/domains/savabg.info/public_html/pic/sidebar.php on line 73"


here is the direct link
http://pic.savabg.info/sidebar.php

Any idea what's causing it?  I am using the latest version of cpg

ecto



wipqozn1

What a pity - that this mod is not developed anymore. It's very useful, however there is much more to add.

My question is: how can I add some div-s to the sidebar? As far there is one who display last added items:

<div class='normalbox' align="center">
<?php
//Print the last uploaded pictures
$i=0;
foreach(
$data AS $picture) {
 $thumb_url "$image_url$picture[filepath]$CONFIG[thumb_pfx]$picture[filename]";
 $description '<a href="' $link_url $i '"><img src="' $thumb_url '" border="1" vspace="2" hspace="2" ></a>';
 print $description;
 $i++;  
}
?>

</div>


How can I e.g. display most popular items?  I tried do some code but without any results.

mrpepsi

Help I keep getting this error message.
Fatal error: Call to undefined function: db_query() in /gallery/sidebar.php on line 73

Here is the link to sidebar: http://www.eastgermanshepherdpups.com/gallery/sidebarInstall.php

Thanks,

mrpepsi

Reinstalled and not getting fatal error message anymore but still cant get it to work.

Help please.

sidebar link: http://www.eastgermanshepherdpups.com/gallery/sidebarInstall.php


Sami

#55
this mod seems old , but let's try to fix that
- all db_query should be cpg_db_query
- all db_fetch_rowset should be cpg_db_fetch_rowset,
edit sidebar.php correct them and try again
‍I don't answer to PM with support question
Please post your issue to related board

mrpepsi

Ok I did that now it says (east german picture gallery) but no tree.

Thanks,

mrpepsi


Joachim Müller

Quote from: mrpepsi on June 26, 2007, 06:16:37 PM
Help I keep getting this error message.
Fatal error: Call to undefined function: db_query() in /gallery/sidebar.php on line 73
Has been asked and answered only two posting above yours (see Nibbler's reply). Make sure to have read a thread before replying to it! ::)

itsonlychand

Hello there

I am trying to install Sidebar MOD. I have installed Coppermine at www.MobileMastee.com/wallpapers

I am getting this error

Fatal error: main() [function.require]: Failed opening required 'DB.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mobilee/public_html/wallpapers/sidebar/lib/layersmenu-common.inc.php on line 16

Please help and thanks in advance.