forum.coppermine-gallery.net
No Support => Modifications/Add-Ons/Hacks => Mods: Miscellaneous => Topic started by: Tarique Sani on May 12, 2004, 09:37:26 am
-
What is it?
(http://tariquesani.net/lj_img/snapshot1.jpg)
See the picture... If you use Mozilla you would be familiar with sidebars if you are not and still use Mozilla then hit F9 and the side bar panel will open. This is a utility which will add another tab to this sidebar panel which will show you
1. The categories and albums of the given coppermine gallery in a tree structure. It respects user permissions
2. It has a tiny search form which will allow you to search the gallery
3. It can show the thumbnail of last uploaded picture
It has user setable themes and also the user can set the number of thumbnails she wants to see... This is cookie based and does not take up any server resource. It works with Mozilla 1.0 (and all avian and canine variants), Konq 3.2, Opera6+ and Internet Explorer 5+
How do I install it on my server?
Presuming that you have a working Coppermine setup, Download the sidebar zip file from http://prdownloads.sourceforge.net/coppermine/cpg1.2_sideBar.zip?download , unzip the contents and just upload all of them in the same folder as your Coppermine files, thats it!!
But how do I see it?!
Once you have uploaded all the files just point your browser at http://yourdomain.com/pathToYourGallery/sidebarInstall.php and follow the instructions there.
It is great but I don't like any of your themes...
Themes are controlled by the tree graphics and a CSS file, the graphics and CSS file are in the themes subfolder of the sidebar folder, you can change the graphics and CSS to suit yourself, if you feel that you have come up with a particularly great theme let me know I would be glad to bundle it with the distribution files.
Did you make this all by yourself?
No I used phpLayersMenu for tree generation and the idea itself crystalised when I saw Sitebar. Aditya Mooley aditya@sanisoft.com wrote two functions which I was too lazy to write ;)
Is this free software?
Yes! this is a free software under the terms of GNU Public License.
DOWNLOAD FROM
http://prdownloads.sourceforge.net/coppermine/cpg1.2_sideBar.zip?download
Notes
'Target address for the 'See more pictures' link' in config should have a trailing '/' for the sidebarInstall.php to provide proper paths.
Comment out lines 12 and 16 in the file sidebar/libs/layersmenu-common.inc.php if you are having problems with safe_mode or PEAR
Tarique Sani
[Edited By Sami]:
Hot fix for recent version of CPG
http://forum.coppermine-gallery.net/index.php?topic=6119.msg212887#msg212887
-
Simply great !!!
Would it be a dream if you were able to develop this same system tree on the index of Coppermine ???
Mozilla has really innovant things ... drop IE !
-
Hi Tarique,
Tried this on both my sites, but both failed, as they are in safe mode. I tried using both IE6 and Firefox.
Is it possible to overcome safe mode with this?
-
Tried this on both my sites, but both failed, as they are in safe mode. I tried using both IE6 and Firefox.
Well sidebar DOES not depend on safe mode - let me know what happened - JS errors? URL?
See the code it is really simple - it does not write anything just reads...
Could you add sidebar from my website http://tariquesani.net/sidebarInstall.php ? does that work
-
Would it be a dream if you were able to develop this same system tree on the index of Coppermine ???
It is in the works - the templating system in CPG is too messy for a clean solution - I want it as an admin setable option where clicking on the the "Album List" will show such a tree..
-
Hi Tarique,
First, yes the sidebar works fine on your site, both using IE6 and Firefox.
All the following happened on both my sites, on different servers(in different continents), but both running in safe mode.
First problem;
When using IE, I just got 404 errors. On checking, found link was missing '/', so my url was 'galleriessidebar.php','_search')'.(I don't understand why this happened on my sites but yours worked correctly)
I altered this so the '/' was there, then the link worked, but got the errors below.
Site 1.
Warning: main(): open_basedir restriction in effect. File(/usr/share/pear/PEAR.php) is not within the allowed path(s): (/home/httpd/vhosts/hsocuk.com/httpdocs:/tmp) in /home/httpd/vhosts/hsocuk.com/httpdocs/galleries/sidebar/lib/layersmenu-common.inc.php on line 12
Warning: main(PEAR.php): failed to open stream: Operation not permitted in /home/httpd/vhosts/hsocuk.com/httpdocs/galleries/sidebar/lib/layersmenu-common.inc.php on line 12
Fatal error: main(): Failed opening required 'PEAR.php' (include_path='.:/usr/share/pear') in /home/httpd/vhosts/hsocuk.com/httpdocs/galleries/sidebar/lib/layersmenu-common.inc.php on line 12
Site2;
Warning: SAFE MODE Restriction in effect. The script whose uid is 403216 is not allowed to access /usr/local/lib/php/PEAR.php owned by uid 0 in /web/sites/14/langportrd/www.langportrd.f2s.com/galleries/sidebar/lib/layersmenu-common.inc.php on line 12
Fatal error: Failed opening required 'PEAR.php' (include_path='.:/usr/local/lib/php') in /web/sites/14/langportrd/www.langportrd.f2s.com/galleries/sidebar/lib/layersmenu-common.inc.php on line 12
When trying in firefox, the link was correct, but obviously I got the same fatal errors.
-
OK, fixed it.
reading the error messages, I looked at the code, and edited out lines 12 and 16 of the layersmenu_common.inc.php, and it now works.
Don't know what this restricts yet though
-
/ missing most likely is due to the config not having it
PEAR is not being used in this case - so I will comment it out and reload the zip file in the download area - thanks for spotting the bug
-
/ missing most likely is due to the config not having it
Does this mean to use this you need the 'Target address for the 'See more pictures' link' in config to have a trailing '/'.
Will this no longer cause other problems, or am I confused about what you mean?
-
Does this mean to use this you need the 'Target address for the 'See more pictures' link' in config to have a trailing '/'.
Will this no longer cause other problems, or am I confused about what you mean?
Yes - this is what I meant, have added notes to the first message to the effect...
-
I can't make this work as pictured in either IE, Firefox, or Netscape. All I get are the usual multi-media stuff, including Tarique's site.
-
All I get are the usual multi-media stuff, including Tarique's site.
What do you meam by this...
-
in firefox i press F9 nothing happens.. I have the 3 default sidebar choices. Bookmarks, History, Edit CSS (one of mine)
-
in firefox i press F9 nothing happens.. I have the 3 default sidebar choices. Bookmarks, History, Edit CSS (one of mine)
F9 works only which Mozilla as stated above. When you click on the Install link for Mozilla using Firefox it will create a Bookmark which opens in the sidebar
-
i cant seem to make it work with IE either... 404 errors. It was missing a slash in sidebar.php i chnaged that but still same issue. please help
thanks
-
i cant seem to make it work with IE either... 404 errors. It was missing a slash in sidebar.php i chnaged that but still same issue. please help
please give URL to install your site's sidebar....
-
sorry..
http://www.defencetalk.com/pictures/sidebarInstall.php
-
you have still have a / missing
javascript:void(open('http://www.defencetalk.com/picturessidebar.php','_search'))
should be
javascript:void(open('http://www.defencetalk.com/pictures/sidebar.php','_search'))
Do that change and try again - it is working fine in Mozilla though
-
Thanks Tariq. Excellent mod, very very handy. Thank you!!!
-
It's perfect !!! :) It works well !!! :)
2 questions however ...
1. How to purpose this to visitors ??? http://www.sortons.net/photos/sidebarInstall.php or is there another way ? (for example a link in front page or anywhere else)
2. I asked you to do this on the main page ... or ... it would be great to insert this great mod in any page we want !!! (it would be great for me)
Is it possible, or not ? (I think it would have the same problem like SSI isn't it ?)
-
1. How to purpose this to visitors ??? http://www.sortons.net/photos/sidebarInstall.php or is there another way ? (for example a link in front page or anywhere else)
You can link the above from any where you want - put it in the top menu if you want.... Since this is an add-on No core files have been modified.... It is left upto the web master on how to promote it.
-
What do you mean? It's up to you how to promote this on your site - you could use anycontent.php or another custom page.
GauGau
-
Mmmmmmm I see your answers ... but I know my english is very bad ...
Ok I start again ...
in fact, users have the possibility to
1. incorporate directly the Side Bar with JS
2. to add (how) sidebar.php like FAVORITES (so ... I think)
I would in fact how it works in the 2nd solution (sidebar.php) ... I know HOW to add an url to favorites, I know HOW to use Historique, but I have never done a SIDEBAR FOR IE (that's why I think Mozilla = future :))
Thanx (because the sidebarInstaller is in english et there was some sentences I don't understand .. the signification :))
-
Take a look at Tarique's demo page http://tariquesani.net/sidebarInstall.php - to add the sidebar in IE on Windows, you just drag the higlighted link to your links bar (which itself is in the favorites subfolder links). To illustrate this to your users, just add some graphics/screenshots (similar to the one I attached to my posting):
GauGau
[attachment deleted by admin]
-
Thanx for your VERY FUNNY (but demonstrative and easy to understand) Screenshot :)
-
But wouldnt it be nice if you could just hit a link in the menu. And the sidebar would open up without all the added extra stuff.
-
you could do some browser sniffing and only show the link for the browser the user seems to use, but alas some modern browser are capable of "disguising" themselves as other browsers, so it's not that easily done.
GauGau
-
I have a feeling this needs to go somewhere else, but I can't figure out where the answer is, and it was the sidebar that alerted me to this.
I love the sidebar, and would love to have it index out my gallery for me, but what I get is the link to Home, but under that, the tree goes to User galleries - but I'm the only one that uses the gallery. My user is the only one in the user list, and all of my albums are under the *My Gallery* section of the Album manager. Any clue as to why the sidebar tree doesn't list out my albums?
here's my gallery:
http://www.xxxwasabi.org/gallery/
and here's the sidebar install:
http://www.xxxwasabi.org/gallery/sidebarInstall.php
Thanks! (and feel free to direct me to the proper place if this isn't it)
-
Ah, never mind. it looks as though my problem is related to the fact that I hadn't RTFM and had ftp'd all my directories into albums/userpics.
oh well. I'd been wanting a reason to redo the whole damned thing - this is as good as any.
-
Nice thing exactly this I need. But it seems it doesnt work :\'(
when I install it and then I want to show it it shows some errors:
Warning: main(): open_basedir restriction in effect. File(/usr/share/php/PEAR.php) is not within the allowed path(s): (/www/j/je-nejlepsi) in /www/j/je-nejlepsi/public_html/mismas/album/sidebar/lib/layersmenu-common.inc.php on line 12
Warning: main(PEAR.php): failed to open stream: Operation not permitted in /www/j/je-nejlepsi/public_html/mismas/album/sidebar/lib/layersmenu-common.inc.php on line 12
Fatal error: main(): Failed opening required 'PEAR.php' (include_path='.:/usr/share/php:/usr/share/pear') in /www/j/je-nejlepsi/public_html/mismas/album/sidebar/lib/layersmenu-common.inc.php on line 12
Iami not PHP-guru so I dont exactly know what it means but my web is hosted on system with safe mode restriction. Is there any problem with it?
you can test in on
http://www.je-nejlepsi.cz/mismas/album/sidebarInstall.php
-
This mod needs some libs from PEAR which most hosts give as default - you will either have to
1) Install pear in your directory on the server
OR
2) Ask your webhost to allow the said directory in open_basedir
OR
3) Go back to the first post and read it again carefully ;)
-
Installed and works like a charm. Thanks Tarique for this mod.
One question though.. how do you modify the sidebar to show a selected number of random images ?
-
I just upgraded to 1.3.2 and Installed the sidebar, (which btw I love it!) but I still get the // bug. All the links has // after the root address, for example:
http://alex.no-ip.biz//index.php?cat=3 (http://alex.no-ip.biz//index.php?cat=3)
and so on ???
I'ts me or is only that the sidebar has a bug?
-
check coppermine config, make sure "target url for ecards" is set correctly.
Joachim
-
just changed the bookmark and now, after the upgrade, it's working 100% ok!
I love this mod, thanks ;)
-
Really clever mod - my compliments and thanks.
- Has anyone seen a similar hack that would accomplish such a nav tree within Coppermine itself??
- OR is anyone thinking this would be a future option?
/mk
-
mod threads are not the place to request totally unrelated other mods ::).
Joachim
-
Hi!
Really great mod but... I'd like to show under 'last uploaded pictures' last X pictures from lastcom album along with the comments. As I'm not good in PHP I tried to show only the picture by copying the code and changing the variablesnames but I got only non related error (sth about smileyfunction).
If anyone has done this mod for mod ;) could you please post here a solution?
Thanks in advance.
Best regards
Borys
-
Tarique or anyone else, how can i modify the sidebar so it will show a number of random images from the gallery instead of the last uploaded ?
Would be nice to have that, would be even nicer if there was a timer function on it that replaces the pictures shown with others after a 1 minute or so.
Thanks guys and girls!
-
i run isntall script but giving that error
i am using 1.3.2
Tasarim Dunyasi Galeri
Warning: main(DB.php): failed to open stream: No such file or directory in /home/tasarim/public_html/galeri/sidebar/lib/layersmenu-common.inc.php on line 16
Fatal error: main(): Failed opening required 'DB.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/tasarim/public_html/galeri/sidebar/lib/layersmenu-common.inc.php on line 16
-
make sure you have unzipped the package properly, preserving the folder structure.
-
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";
/**
-
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"?
-
This is probably pretty simple for you guys. Please let me know. Thanks
-
as a first step, don't post a dummy url but an actual link to your page.
-
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 :)
-
did you read the readme file that comes with the package?
-
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
-
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)
-
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
-
Just tried it, works fine..
-
Read the thread before posting on it.
http://forum.coppermine-gallery.net/index.php?topic=6119.msg101525#msg101525
-
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.
-
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,
-
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
-
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
-
Ok I did that now it says (east german picture gallery) but no tree.
Thanks,
-
Got it thanks a lot SAMI
-
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! ::)
-
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.
-
Well, http://mobilemastee.com/wallpapers/sidebar/lib/DB.php isn't here, so you probably haven't uploaded all files.
-
A sidebar has gone into cpg1.5.x btw.