4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: budduke on April 25, 2009, 10:31:46 PM
-
[MOD] Left Gallery Quick List V1.03
I was asked by another person if this could be done or not so I gave it a try and it worked!
It is based on JQuery's Treeview script that can be found at
http://docs.jquery.com/Plugins/Treeview
Demo: http://www.budduke.com/gallery (http://www.budduke.com/gallery)
Backup the following files before you begin...
includes/page_header.php
includes/functions.php
lang/english/main.php
your template folder/home.html
your template folder/categories.html
your template folder/header.html
Revisions:
1.0 first try at it
1.01 fixed page number problem with modifield jquery.treeview.js file
1.02 fixed session issue problems and location highlighting when page#rs involved.
- replace the jquery.treeview.js file with the new one in the zip file attached
- replace the insert in the header.html and the functions.php files to fix these issues
1.03 fixed the hide list till page load problem with the updated code.
Let's begin with the mod...
New files added in attached zip file (The Treeview script from jquery)
In your template folder create a folder and call it "quickscript" and copy all files from the zip folder to that directory along with a sub folder called images...
the finished path should look likt templates/your template directory/quickscript/images
in the includes/page_header.php file
look for
?>
insert before
//-----------------------------------------------------
//--- MOD Left Quicklist -------------------------------
//-----------------------------------------------------
$left_quicklist = get_left_quicklist($cat_id);
$site_template->register_vars(array(
"left_quicklist" => $left_quicklist,
"lang_left_quicklist" => $lang['left_quicklist']
));
unset($left_quicklist);
// END MOD Left quicklist
in the includes/functions.php file (updated for version 1.03)
look for
?>
insert before
//MOD Left QuickList
function get_left_quicklist_bits($cat_id, $cid = 0, $depth = 1) {
global $site_db, $drop_down_cat_cache, $cat_cache, $site_sess;
//config area
$left_quick_length=24; //length of category name, 0-3 =off (if on, will shorten name to fit with ... after it)
$adjust_depth=1; // try to adjust for depth for right side to line up
$with_folder=0; // if you want a folder to be displayed then set this to 1 (I thought it took to much screenspace)
//end config
if (!isset($drop_down_cat_cache[$cid])) {
return "";
}
$category_list = "";
foreach ($drop_down_cat_cache[$cid] as $key => $category_id) {
if (check_permission("auth_viewcat", $category_id)) {
$quick_cat_name=format_text($cat_cache[$category_id]['cat_name'],2);
$left_quick_length_var= $left_quick_length;
$test=strlen($quick_cat_name);
if ($adjust_depth && ($depth >1)){
$left_quick_length_var = $left_quick_length -(($depth-1)*3) -(($depth-1)*$with_folder);
}
if (($left_quick_length_var > 3) && (strlen($quick_cat_name)> $left_quick_length_var) ){
$quick_cat_name= substr($quick_cat_name, 0, ($left_quick_length_var - 3))."...";
}
if ($with_folder){
$category_list .= "<li><span class='folder'><a href='".$site_sess->url('categories.php?'.URL_CAT_ID.'='.$category_id)."'>".$quick_cat_name."</a></span>";
}
else {
$category_list .= "<li><a href='".$site_sess->url('categories.php?'.URL_CAT_ID.'='.$category_id)."'>".$quick_cat_name."</a>";
}
$result= get_left_quicklist_bits($cat_id, $category_id, $depth + 1);
if ($result){
$category_list .= "<ul>".$result."</ul></li>";
}
else {
$category_list .= "</li>";
}
}
}
unset($drop_down_cat_cache[$cid]);
return $category_list;
}
function get_left_quicklist($cat_id) {
global $drop_down_cat_cache, $cat_parent_cache;
$category = "<ul id='left_quicklist_nav' class='filetree' style='display: none'>";
$drop_down_cat_cache = array();
$drop_down_cat_cache = $cat_parent_cache;
$result= get_left_quicklist_bits($cat_id);
if ($result){
$category .= $result."</ul>";
}
return $category;
}
//END MOD Left QuickList
in the lang/english/main.php file
look for
?>
insert before
//-----------------------------------------------------
//--- Left Quick List -------------------------------------
//-----------------------------------------------------
$lang['left_quicklist'] = "Gallery Quick List";
in your template folder/header.html file (updated for version 1.03)
look for
</head>
insert before
<!-- MOD Left Quicklist -->
<link rel="stylesheet" href= "{template_url}/quickscript/jquery.treeview.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
<script src= "{template_url}/quickscript/jquery.treeview.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
var urlSessName = "<?=SESSION_NAME;?>";
var urlPageName = "<?=URL_PAGE;?>";
$(document).ready(function(){
// first example
$("#left_quicklist_nav").treeview({
collapsed: true,
unique: true,
persist: "location"
});
});
onload=function() {
document.getElementById('left_quicklist_nav').style.display ='block';
}
</script>
<!-- END MOD Left Quicklist -->
in both your template folder/home.html and your template folder/categories.html files
Place this code where you would like to display the list on the left side
My example look for
{endif random_image}
insert after in both files...
<!--MOD left Quicklist-->
<table width="150" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head2" height="20"> <img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_left_quicklist}</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
<tr>
<td>
{left_quicklist}
</td>
</tr>
<tr>
<td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
</tr>
</table>
<!-- END MOD Left Quicklist-->
In the includes/functions.php file you will see at the start of my functions some config settings that you can play with
If your sub categories go real real real deep you may want to place this somewhere else on your template to give it more room.
Inside the quickscript folder there is a jquery.treeview.css file that you can modify to fit into your template better.
The .treeview, .treeview ul and the .treeview ul both at the top of the css file were the best place I found to modify to get the background color to match your template.
There is also .treeview a.selected area that is the background color used for the category you are currently viewing
That is the end of modification, you should now have a quicklist on your site...
-
great mod
works fine
-
... thanks for sharing ... :D
... moved to Mods & Plugins (Releases & Support) ...
-
hi budduke,
nice mod...
thank you for sharing!
-
but its not opening the google friendly urls
how to fix this ??
-
In the new code in functions.php find:
if (check_permission("auth_viewcat", $category_id)) {
insert below: $category_url = $site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$category_id);
Find: $category_list .= "<li><span class='folder'><a href=categories.php?cat_id=".$category_id.">".$quick_cat_name."</a></span>";
Replace with:
$category_list .= "<li><span class='folder'><a href=".$category_url.">".$quick_cat_name."</a></span>";
Find next:
$category_list .= "<li><a href=categories.php?cat_id=".$category_id.">".$quick_cat_name."</a>";
Replace with:
$category_list .= "<li><a href=".$category_url.">".$quick_cat_name."</a>";
Find next:
global $site_db, $drop_down_cat_cache, $cat_cache;
Replace with:
global $site_db, $drop_down_cat_cache, $cat_cache, $site_sess;
-
Very nice , works perfect , thanks a lot budduke
-
Very nice , works perfect , thanks a lot budduke
Wanted to ask if somebody possibly know: When reload current page , left gallery quicklist due to my deep categories gallery spreads to the very wide (what doesnt look like very nice ) and after 2 seconds it arranges itself on exact place , Can I avoid it ? I saw budduke gallery , it makes the same , but only for a while (i know he has 300 categories , I have 1000 but maybe someone knows a trick how to do it ) I had the same problem with language flags , when reload it showed language names and after flags so I had to put the the lang flags to another place and had to shorten the language names , left gallery quicklist fits best on the left sidebar so i wouldn't like to miss it there , thanks Daniel .
-
I had to remove it :( , but very nice MOD anyway for everybody with not too many cats , will be happy if someone will explain how managed to get to put it in left sidebar when having many deep categories
-
Ich finde der Fix von Vano sollte im ersten Post Editiert werden bzw. zugefügt werden!
@budukke,
very nice! THX
-
Very nice , works perfect , thanks a lot budduke
Wanted to ask if somebody possibly know: When reload current page , left gallery quicklist due to my deep categories gallery spreads to the very wide (what doesnt look like very nice ) and after 2 seconds it arranges itself on exact place , Can I avoid it ? I saw budduke gallery , it makes the same , but only for a while (i know he has 300 categories , I have 1000 but maybe someone knows a trick how to do it ) I had the same problem with language flags , when reload it showed language names and after flags so I had to put the the lang flags to another place and had to shorten the language names , left gallery quicklist fits best on the left sidebar so i wouldn't like to miss it there , thanks Daniel .
I saw that also when I ran the script the first time. It seems the different browsers handle it differently. I have very limited knowledge of javascript but I think the problem is the entire page had to be loaded before the javascript kicks in.
Since they have to be list items to work correctly, the browser loads it as a normal list of links until the javascript get to changing it. I saw no way to preload it in anyway before displaying.
I sometimes wonder if flash or regular java may handle this any better? Maybe look into it when I have a little play time.
-
In the new code in functions.php find: if (check_permission("auth_viewcat", $category_id)) {
insert below: $category_url = $site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$category_id);
Find: $category_list .= "<li><span class='folder'><a href=categories.php?cat_id=".$category_id.">".$quick_cat_name."</a></span>";
Replace with:
$category_list .= "<li><span class='folder'><a href=".$category_url.">".$quick_cat_name."</a></span>";
Find next:
$category_list .= "<li><a href=categories.php?cat_id=".$category_id.">".$quick_cat_name."</a>";
Replace with:
$category_list .= "<li><a href=".$category_url.">".$quick_cat_name."</a>";
Hi
i tried the same
but its not working for me
-
how to display all the categories in the expand view
-
@budduke
Thanks a lot for your respond , this quicklist is really very very nice and usefull , I had to remove it , but I really miss it now :( I will wait if you will happily find a solution, but I think that it is only my very poor designer ability , that I'm not able to make left sidebar firm like e.g Mawenzi's web where everything is always firm - fest
-
how to display all the categories in the expand view
in your template folder...
look in the header.html file for the
$("#left_quicklist_nav").treeview({
collapsed: true,
unique: true,
persist: "location"
});
Collapsed=true for collapsed list or if you want to expand all categories collapsed= false
unique=true for only only branch being open at a time or unique = false if you want to open any at the same time
Persist variable is what highlights the location you are currently at in the gallery
Hope that help!
-
Halloo,
erst einmal ein grosses lob an budduke, das er sich die mühe gemacht hat mit dem mod, ich habe es, so wie ganz oben beschrieben installiert und es klappt prima.
bei mir ist allerdings das problem auf getreten, das ich sehr viele unterkategorien habe, so das die linke seite sehr sehr lang würde. was mir helfen würde, wäre, wenn auf der linken seite nur die sog. " Hauptkatekorien " angezeigt würden ohne " Unterkategorien " .
Ist das möglich ??
Wo finde ich eigentlich die Datei "pageheader.html " von der budduke in seinem letzten beitrag schreibt ?
gruss
tom
-
Halloo,
erst einmal ein grosses lob an budduke, das er sich die mühe gemacht hat mit dem mod, ich habe es, so wie ganz oben beschrieben installiert und es klappt prima.
bei mir ist allerdings das problem auf getreten, das ich sehr viele unterkategorien habe, so das die linke seite sehr sehr lang würde. was mir helfen würde, wäre, wenn auf der linken seite nur die sog. " Hauptkatekorien " angezeigt würden ohne " Unterkategorien " .
Ist das möglich ??
Wo finde ich eigentlich die Datei "pageheader.html " von der budduke in seinem letzten beitrag schreibt ?
gruss
tom
I redid my post, it is the header.html file not the pageheader.html file, the first one can be found in your template folder.
Using google translate I am assuming you are only wanting the top layer of categories to be displayed without and plus signs to reach any of the categories inside? I am not sure if that can be done or not but will look into it soon.
-
how to right menu ???
-
how to right menu ???
you would place the insert table for home.html and categories.html in the right column area instead.
If you do not have a column on the right side of your template then you need to create one in your template files before you can insert the quicklist.
Hopefully that made sense...
-
Unfortunately, I do not know how to do that Is it possible could do and I will be grateful to you
-
Can you PM me a zip file of your template folder?
or give me a link to what template you are using?
or give me a link to your website so I can see it in action?
-
This is a template on my site my friend
Thanks
-
This is a template on my site my friend
Thanks
That template does not have a column on the right side to place the quick list into so I am not sure what you are wanting?
You need to use a template that has a column on the right side of the screen instead of left and insert my code into it.
-
Well, my friend Thank you
-
Vielen Dank für diesen tollen MOD !!
Mit Firefox arbeitet die Quicklist einwandfrei. Aber im IE 8 "verliert" er immer seine Anmeldung (also User wird wieder abgemeldet). Woran kann das liegen?
Mfg Cyberax
-
Vielen Dank für diesen tollen MOD !!
Mit Firefox arbeitet die Quicklist einwandfrei. Aber im IE 8 "verliert" er immer seine Anmeldung (also User wird wieder abgemeldet). Woran kann das liegen?
Mfg Cyberax
I am also using IE8 and do not see a problem with it. I remain logged in the entire time I am browsing with the quicklist.
Can you give me a link so I can see what is happening?
-
Hi,
thanks for your answer. It's on www. vodanet. de. vu and there in the left on "Galerie". There you came to the Gallery.
Btw. with some Linux - "Explorers" its the same problem. I log in - on when i use the Quicklist the user is again logged off.
Thanks for your help!
-
Hi,
thanks for your answer. It's on www. vodanet. de. vu and there in the left on "Galerie". There you came to the Gallery.
Btw. with some Linux - "Explorers" its the same problem. I log in - on when i use the Quicklist the user is again logged off.
Thanks for your help!
I saw no problem, I remained logged in the entire time I was browsing around. I tried ie8,firefox,and chrome.
I wonder if it is a cache problem on the client side? what happens when you browse the normal way through the categorie menu? those links should be the same. I did notice that no matter where I went on your site, the address bar read "www. vodanet. de. vu" and not the actual link. I wonder if that is where your problem is hiding but it works fine on my browser.
-
@budduke
... sorry for my anwer to cyberax in german ...
... but it's much more easyer for me ... and perhaps also for cyberax ... ;)
@cyberax
... das Problem besteht, wie bereits budduke angedeutet hat, in dem 100% iFrame in dem deine Website läuft und der Browsereinstellung ...
... der IE betrachtet in dem iFrame die Cookies, die von 4images gesetzt und zum Loggin genutzt werden wie die von Drittanbietern ...
... die Standardeinstellung im IE ist aber ... Cookies von Drittanbietern nicht zu akzeptieren ... und so wirst du immer wieder ausgeloggt ...
... wenn du nun deine IE-Browser-Einstellungen herabsetzt und die Cookies von Drittanbietern akzeptierst, so ist für dich das Problem gelöst ...
... ein weiteres Problem bleibt aber ... wie willst du deinen Usern erklären, dass sie ihre IE-Einstellungen herabsetzen sollen, nur um deine Website zu besuchen ...
... ich glaube, dass kannst du deinen Usern nicht abverlangen und zumuten ...
... einzige Lösungsmöglichkeit ...
... deine 4images-Galerie muss aus dem iFrame von "de.vu" heraus ...
... der Link in deiner Startseite sollte also direkt auf die index.php deiner 4images-Galerie mit target="_blank" oder target="_top" verweisen ...
PS. ... das ist ein alt bekanntes Problem ... für dich nochmals dargelegt ... ;)
-
@budduke: Thanks for your help! It's really the problem, wich you and mawenzi talked about.
@mawenzi: Dir natürlich auch vielen Dank für die schnelle Hilfe. Da wäre ich alleine sicher nicht drauf gekommen! Stimmt natürlich, dass ich die Galerie direkt verlinken kann. Das hatte ich bis jetzt noch nicht gemacht, da ja dann alle den Pfad sehen...also Server URL.... und da es nicht "mein" Server ist... Aber ok.. mal schauen. Nun weiß ich zumindest woran es liegt - und klar - dass die USer ihre Sicherheitsabstellungen herabsetzen müsste, dass kann man nicht verlangen.
Vielen Dank nochmal.
Thank's a lot!
-
Hi
i tried the same
but its not working for me
I've added one more step into my post.
-
I have tried again and it doesnt work again, it seems like this,
(http://img21.imageshack.us/img21/5527/2012a.png) (http://img21.imageshack.us/i/2012a.png/)
And the second problem with mod is, categorie width, I have tried to fix this with css but cannot.
All categories cannot readable because of width problem how can i fix this?
Here is the 2nd screen.
(http://img694.imageshack.us/img694/8568/2011.png) (http://img694.imageshack.us/i/2011.png/)
-
And the second problem with mod is, categorie width, I have tried to fix this with css but cannot.
All categories cannot readable because of width problem how can i fix this?
Look at line#5 on the insert for the includes/functions
$left_quick_length=24; //length of category name, 0-3 =off (if on, will shorten name to fit with ... after it)
Problem if you make it too large would be that your left column will take up more of your page...
-
its done now, i am still waiting for new solutions from V@no :)
-
Budduke Hi, very good this module!
excellent module, I was long looking for something for my site.
Please, how do I display the amount of images that category and if you have new images show (news)?
for exemple(
Cat 1 (165 video)
....Cat 1.1 (65 video) (news)
....Cat 1.2 (100 video) (news)
Cat 2 (458 photo)
....Cat 2(458 photo)
Thank you for your help
-
Thanks for the MOD,
but there is a problem - it is including in the page_header.php, so for EVERY page the category tree will be created (calculated sizes, queries etc.)
I've noticed some increase of page generating time with this mode.
Is there a way to cache the mod or include it only in home template (I don't display category menu in all pages exclude home page)?
Updated:
As I've categories only in index, I move
//-----------------------------------------------------
//--- MOD Left Quicklist -------------------------------
//-----------------------------------------------------
$left_quicklist = get_left_quicklist($cat_id);
$site_template->register_vars(array(
"left_quicklist" => $left_quicklist,
"lang_left_quicklist" => $lang['left_quicklist']
));
unset($left_quicklist);
// END MOD Left quicklist
from page_header.php to index.php before
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
-
What if I have [MOD]Language select (http://www.4homepages.de/forum/index.php?topic=4743.0) (Version B) installed ?
I tried installing it, and when I choose another language, all works (it translates quicklist). But when i click in category in quicklist, it goes back to default language. Maybe i did something wrong in installation ?
EDIT :
got it work partially.
I changed in functions.php
global $site_db, $drop_down_cat_cache, $cat_cache;
to this :
global $site_db, $drop_down_cat_cache, $cat_cache, $site_sess;
also changed :
$category_list .= "<li><span class='folder'><a href=categories.php?cat_id=".$category_id.">".$quick_cat_name."</a></span>";
}
else {
$category_list .= "<li><a href=categories.php?cat_id=".$category_id.">".$quick_cat_name."</a>";
to this :
$category_list .= "<li><span class='folder'><a href=\"".$site_sess->url(ROOT_PATH."categories.php?cat_id=".$category_id."")."\">".multilang($quick_cat_name)."</a></span>";
}
else {
$category_list .= "<li><a href=\"".$site_sess->url(ROOT_PATH."categories.php?cat_id=".$category_id."")."\">".multilang($quick_cat_name)."</a>";
Sorry, seems that V@no already made fix for this :S. But i have more problems.
Now it doesnt change language to default (it stays to language, which user choosed), but in quicklist it doesnt show category I'm currently viewing (It shows correctly only when default language selected).
categories.php?cat_id=10&l=english - doesnt work
categories.php?cat_id=10 - works
Any help with this ?
-
@urmasmuld,
It should strip anything after the '&' symbol in the url string when deciding to highlight current location in the query.
What happens if you are using 'english' and have more then one page of items?
Can you give me a link to see what it is doing?
-
Sure, link is here (http://www.rskpower.com)
It doesnt matter how many pages of pics I have, result always the same. If using default language list is working, but when changing to english, it wont strip the list. Sorry for my bad english :roll:
-
in here i see a cool sliding effect ;)
http://jquery.bassistance.de/treeview/demo/prerendered.html
how to add this feature to the qucklist ? i mean the cool sliding effect :wink:
tnx !
-
in here i see a cool sliding effect ;)
http://jquery.bassistance.de/treeview/demo/prerendered.html
how to add this feature to the qucklist ? i mean the cool sliding effect :wink:
tnx !
Open header.html in templates folder and find
$("#left_quicklist_nav").treeview({
collapsed: true,
unique: true,
persist: "location"
replace with :
$("#left_quicklist_nav").treeview({
collapsed: true,
unique: true,
animated: "medium",
persist: "location"
-
Sure, link is here (http://www.rskpower.com)
It doesnt matter how many pages of pics I have, result always the same. If using default language list is working, but when changing to english, it wont strip the list. Sorry for my bad english :roll:
Apprently the hack I did in the js file that searches for the '&' symbol, I thought it would look for the first one and strip everything after it but in your case it looks like it is counting how many it finds, '2' in this case, and strips everything after the second one :(
I am not very good with the commands in javascsript but will look around and see what I can find...
Modified
Maybe possible fix if you could test it for me
Backup your jquery.treeview.js file and Replace line #204 that looks like this...
var locend = location.href.search(/&/);//character you are searching for
with this
var locend = location.href.indexOf(/&/);//character you are searching for
from my quick search on google this looks like the correct way of doing this but I do not have a site that I can test it on right now so if you could try it and let me know I will make the change on the original file on this post...
-
@ budduke
Won't work :cry:
-
@ budduke
Won't work :cry:
Darn, Wil have to setup a test site with V@no's multi lang mod along with mine to see what is happening.
I think I know what it is doing but not sure how to fix it just yet.
-
@ budduke
Won't work :cry:
Darn, Wil have to setup a test site with V@no's multi lang mod along with mine to see what is happening.
I think I know what it is doing but not sure how to fix it just yet.
Modified
Backup your jquery.treeview.js file and Replace it with the modified one attached to this reply and let me know if it fixes it. It should.
My brain works better when food is in me :)
Well, uploaded this file, now all subcategories have been lost (with both languages) from list :S (you can see it here (http://www.rskpower.com))
Trying to find solution myself too. If found, let you know. But thanx for helping :D
-
@urmasmuld,
It has to be something simple I overlooked...
Modified
I think I got it this time. At least it works on my local computer server now so see how the attached file works on your site and let me know so I can modify my original post.
I still see one minor bug with this version...
If you are on a details page of a item that was on any page of the category except page 1 then it still does not work.
I had an image on page 2 or my test site and when I hovered over the navigation at the top of the page the link had the &l=spanish at the end of the link and the &page comes before it but in the gallery quicklist the &l=spanish comes before the &page= :?: :?: :?: not sure why if if your users will notice but I may dig deeper into it later...
-
@urmasmuld,
It has to be something simple I overlooked...
Modified
I think I got it this time. At least it works on my local computer server now so see how the attached file works on your site and let me know so I can modify my original post.
I still see one minor bug with this version...
If you are on a details page of a item that was on any page of the category except page 1 then it still does not work.
I had an image on page 2 or my test site and when I hovered over the navigation at the top of the page the link had the &l=spanish at the end of the link and the &page comes before it but in the gallery quicklist the &l=spanish comes before the &page= :?: :?: :?: not sure why if if your users will notice but I may dig deeper into it later...
Worked great !
Million times : thank you, thank you, thank you.... :mrgreen:
Only a little problem (really a little one :)). When choosed default language and going to category's 2nd page and then choosing another language, then qicklist wont show anything. But when going after that to 3rd or 1st page, its working again. See it in action here (http://www.rskpower.com/categories.php?cat_id=34&page=2)
-
Only a little problem (really a little one :)). When choosed default language and going to category's 2nd page and then choosing another language, then qicklist wont show anything. But when going after that to 3rd or 1st page, its working again.
This problem should now be fixed with version 1.02 of this mod.
I was able to fix all the session/page issues with the help of V@no..
-
hi! doesn't work with me. could it be that I modded the URLs to be Search Engine Friendly?
-
hi! doesn't work with me. could it be that I modded the URLs to be Search Engine Friendly?
Can you provide a link to look at it?
I am pretty sure you are correct but I have not heard of anyone complaining about that part of it.
When you hover over the links do they show your modified search friendly links or the cryptic ones that 4images uses?
-
All right, it works very good. But one thing we should improve.
If I go to my index page the list need aprox. 2 seconds to collapse to the normal view:
Open index:
(http://www.katzen.ag/images/forum/Capture1.JPG)
after 2 seconds everything is ok:
(http://www.katzen.ag/images/forum/Capture2.JPG)
In my opinion it looks unprofessional this bug...what is the solution? How we can accelerate this progress?
Thanks
PS: here you can see it:
www.katzen.ag
Hakan
-
All right, it works very good. But one thing we should improve.
If I go to my index page the list need aprox. 2 seconds to collapse to the normal view:
In my opinion it looks unprofessional this bug...what is the solution? How we can accelerate this progress?
Actually I have been working on a version2 of this mod for awhile but could not get it to work correctly. The other ways were loading from static files which would not work for 4images because each list is different depending on your rights on the categories... what to do...
The problem with this mod is that the list is normal html list that is loaded when the page is first viewed, only after the html page is loaded, then the javascripts kick in by design and change it's looks. cannot not get past that.
then today, after your post, I googled "hide html list till page loads" and could it be this easy? YES IT WAS! my site is using the modified code now if you want to check it out. Your list is much larger then mine if you could test it out.
Will change my original post to include these modifications, the only downside is that the entire list is hidden and it moves what is below it as it loads, can not get around that.
OK,
in your includes/functions.php file
look for
$category = "<ul id='left_quicklist_nav' class='filetree'>";
replace with
$category = "<ul id='left_quicklist_nav' class='filetree' style='display: none'>";
\\this hides the list when loading the page
in your your template folder/header.html file
look for
</script>
<!-- END MOD Left Quicklist -->
insert before
onload=function() {
document.getElementById('left_quicklist_nav').style.display ='block';
}
\\this show the list after the page is loaded.
how cool and easy is that fix?
Or you can just replace the code in my original post. Will have it changed in a few minutes...
-
P*E*R*E*C*T
Very, very cool solution, now it looks perfect... thanks man!
Have a nice week!
Hakan
-
Hi,
how to make this work on details.html page?
persist: "location"
The Quicklist is there but collapsed and it's not showing the category where iam in:
(http://img42.imageshack.us/img42/9543/cat1bh.jpg) (http://img42.imageshack.us/i/cat1bh.jpg/)
In categories.html it's working well.
(http://img408.imageshack.us/img408/861/cat2cm.jpg) (http://img408.imageshack.us/i/cat2cm.jpg/)
i also tried the option:
control: "#treecontrol",
i like to see this, but it's not showing up:
(http://img818.imageshack.us/img818/8360/cat5d.jpg) (http://img818.imageshack.us/i/cat5d.jpg/)
Another question
How to make the main category font bold?
(http://img411.imageshack.us/img411/5162/cat3b.jpg) (http://img411.imageshack.us/i/cat3b.jpg/)
and finally...
How to show also image entrys in the quicklist?
(http://img267.imageshack.us/img267/4659/cat4k.png) (http://img267.imageshack.us/i/cat4k.png/)
Greetz X23
-
Lets take your questions one at a time...
The authors behind the javascript (treeview) that this mod is based on are no longer supporting this script and are not going to make any new improvements to it so I have found another one that I think will be better in the long run...
how to make this work on details.html page?
Does not work, that is why it is not part of the installation because there is no way of linking the details page to a category to highlight that category.
I am currently working with a new quicklist that includes a search and also works with the details page. Will be posting it after I am happy with how it works.
The collapse all,expand all will also be part of the new quicklist.
Bold font for main category? Never actually thought about that one. I did not see an easy way to put it in this mod but will check to see if the new script has any way of doing it for you...
How to show also image entries in the quicklist?
I am assuming you are wanting all the images to also be part of this list? If your database has 100,000 to 1,000,000's of images, do you know how long and slow the script would run? I may be wrong there but I think it would be way to much to ask. That would turn it into more of a sitemap instead of a quicklist.
That will probably not be part of the new mod when I post it but I may look into further for you but I will need to see how well it runs because you don't want to drawing down your site to a crawl...
Sorry I did not give you the answers you needed but you have given me a reason to post the new version sooner
And also sorry, I meant to post something saying that this mod is no longer supported but was waiting till I posted the new one to move everyone over to...
-
how to make this work on details.html page?
Does not work, that is why it is not part of the installation because there is no way of linking the details page to a category to highlight that category.
actually all you need to do is place the same code form page_header.php into details.php above //-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
-
how to make this work on details.html page?
Does not work, that is why it is not part of the installation because there is no way of linking the details page to a category to highlight that category.
actually all you need to do is place the same code form page_header.php into details.php above //-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
Hi,
thank you :)
but it does not work for me.. hmm
Greetz X23
-
@V@no,
x23piracy is correct, it does not work. The list does come up on the details page but not highlighting the location that you are at.
It is based on the link that is now a details page link instead of a category link, that is why I never had details as part of the install.
the new one will be much better...
@x23piracy,
I did get the font=bold for the top level categories to work on the new version last night, so I think it will cover most of your requests. Hope to have it posted soon.
-
@V@no,
x23piracy is correct, it does not work. The list does come up on the details page but not highlighting the location that you are at.
It is based on the link that is now a details page link instead of a category link, that is why I never had details as part of the install.
the new one will be much better...
@x23piracy,
I did get the font=bold for the top level categories to work on the new version last night, so I think it will cover most of your requests. Hope to have it posted soon.
Hi,
i lean back and stay tuned :) do your work i have time... :thumbup:
EDIT:
Hey @budduke
How can i get more space between den image for opened folder and the text?
i tryed to make more space on the right side of the gif (width 19 px) but the
text allready stay directly near the image.
The folder image for closed folder has some space...
Greetz X23
-
@ x23piracy,
I think it is in the CSS file that is in that quickscript folder but not sure where. I am not a CSS guru, enough to be dangerous...
Will try to look this weekend...
-
@ x23piracy,
I think it is in the CSS file that is in that quickscript folder but not sure where. I am not a CSS guru, enough to be dangerous...
Will try to look this weekend...
Hi,
yes must be this:
.filetree li.expandable span.folder
{
background: url(images/folder-closed.gif) 0 0 no-repeat;
}
may i have to setup some padding or margin to that css element.
EDIT:
I was wrong it's that line:
.filetree span.folder, .filetree span.file { padding: 1px 0 1px 16px; display: block; }
i undo my change to the closed folder icon and edited that line to:
.filetree span.folder, .filetree span.file { padding: 1px 0 1px 19px; display: block; }
(http://www1.xup.in/tn/2010_10/54739710.png) (http://www.xup.in/dl,54739710/temp.png/)
Works! :) thx budduke
Greetz X23
-
Hi,
Could someone help me where I can replace the style?
I would like it to appear folder.gif etc.
thank you
-
Hi,
Could someone help me where I can replace the style?
I would like it to appear folder.gif etc.
thank you
Dear x23piracy,
I would ask for your help, how to mod quicklist's folder images left to display. (Folder.gif, closed.gif folder, etc)
thanks,
Jean Mitchel
Hi,
in the header part in the mod example you will find this:
// first example
$("#left_quicklist_nav").treeview({
collapsed: true,
unique: true,
persist: "location"
add this line:
control: "#treecontrol",
for example my code looks like:
// first example
$("#left_quicklist_nav").treeview({
control: "#treecontrol",
collapsed: true,
unique: true,
animated: "slow",
persist: "location"
You can also check this link for future improvements:
http://jquery.bassistance.de/treeview/demo/ (http://jquery.bassistance.de/treeview/demo/)
If i could help you click this:
(http://www.4homepages.de/forum/Themes/babylon/images/german/thank_you.gif) (http://www.4homepages.de/forum/index.php?action=thankyou;topic=24677.0;msg=152653)
Greetz X23
-
...
If i could help you click this:
mir wäre das peinlich. 8)
-
Thank you for x23,
Me that I need to folder.gif and file.gif, folder-closed.gif folder-tree shown in the menu.
I want something like a folder marked. (2. attached image).
Thanks for your help!
-
Me that I need to folder.gif and file.gif, folder-closed.gif folder-tree shown in the menu.
I want something like a folder marked. (2. attached image).
Not sure if this is what you are asking or not but in the second insert in the functions file at the top of the insert...
//MOD Left QuickList
function get_left_quicklist_bits($cat_id, $cid = 0, $depth = 1) {
global $site_db, $drop_down_cat_cache, $cat_cache, $site_sess;
//config area
$left_quick_length=24; //length of category name, 0-3 =off (if on, will shorten name to fit with ... after it)
$adjust_depth=1; // try to adjust for depth for right side to line up
$with_folder=0; // if you want a folder to be displayed then set this to 1 (I thought it took to much screenspace)
//end config
Change the $with_folder=1 and the folders should show uip.
-
Thank you very much for you Bud!
It works perfectly! :)
-
I made a little addon to this mod.
If some1 needs to be showed no. of pictures for each category, then find in functions.php
if ($with_folder){
$category_list .= "<li><span class='folder'><a href='".$site_sess->url('categories.php?'.URL_CAT_ID.'='.$category_id)."'>".$quick_cat_name."</a></span>";
}
else {
$category_list .= "<li><a href='".$site_sess->url('categories.php?'.URL_CAT_ID.'='.$category_id)."'>".$quick_cat_name."</a>";
}
and replace it with :
if ($with_folder){
$category_list .= "<li><span class='folder'><a href='".$site_sess->url('categories.php?'.URL_CAT_ID.'='.$category_id)."'>".$quick_cat_name." (".$cat_cache[$category_id]['num_images'].")</a></span>";
}
else {
$category_list .= "<li><a href='".$site_sess->url('categories.php?'.URL_CAT_ID.'='.$category_id)."'>".$quick_cat_name." (".$cat_cache[$category_id]['num_images'].")</a>";
}
-
Hey :)
1st of all , its a nice MOD ... works perfectly ...
is their any chance of showing the [ category images - plugin by V@NO ] in the quick list ?
Thanks !
-
Hey :)
1st of all , its a nice MOD ... works perfectly ...
is their any chance of showing the [ category images - plugin by V@NO ] in the quick list ?
Thanks !
Quick answer No. I would think that even if you could reduce the thumbnails down to that small of a size, you would not be able to tell what they were.
-
I have an error in the name of a category. How can I fix this?
-
I have an error in the name of a category. How can I fix this?
Just off the top of my head, I think there is an escape character in that location of the name. Can you PM me a link to see this so I can see how it is being rendered?
-
Is it possible to show the newest categories on the top of the list???
for example: 1. main cat
--------1. sub cat
-------1. sub sub cat
------- (this is the first sub sub sub cat with pictures) show the newest category always on top
------- (...........................................................)
------- (-..........................................................)
greetz
josef
-
Hi!
Is it possible to show the newest categories on the top of the list???
....
Schon mal versucht: ACP/Allgemein7Einstellungen/Kategorie Einstellungen/Kategorien sortieren nach
mfg Andi
-
:oops: :oops: :oops: :oops: :oops: Schande über mich!!!!
I´m so sorry!
VG Josef
-
brauchst dich doch nicht dafür zu entschuldigen.. :)
-
Hallo an alle Cracks
Hab wieder mal eine Frage!
Ist es möglich nur Kategorien zu zeigen in der KEINE Bilder sind ???
----------
Is it possible to show only categories with NO pictures???
VG
Josef
-
Hallo zusammen.
Super Mod. Läuft hervorragend. Nur wie kann man einstellen, dass nur die Hauptkategorien angezeigt werden?
Die Unterkategorien kann man eigentlich komplett ausblenden. Zumindest für meine Zwecke.
Desweiteren möchte ich den Schrifttyp in dem Mod verändern. Andere Größe, Fett etc. In der CSS des Mods geht das nicht und in der Style.css des Template ändert sich die Schrift für die ganze Seite
Grüße
-
Hallo zusammen.
Super Mod. Läuft hervorragend. Nur wie kann man einstellen, dass nur die Hauptkategorien angezeigt werden?
Die Unterkategorien kann man eigentlich komplett ausblenden. Zumindest für meine Zwecke.
Desweiteren möchte ich den Schrifttyp in dem Mod verändern. Andere Größe, Fett etc. In der CSS des Mods geht das nicht und in der Style.css des Template ändert sich die Schrift für die ganze Seite
Grüße
To get only the main categories to be displayed, here is a quick modification to the code. The only problem is when you are down in the subfolders it does not highlight the main category that the subfolders are in. I do not see a fix for that...
in the functions.php file...
search for
$result= get_left_quicklist_bits($cat_id, $category_id, $depth + 1);
Replace with...
//$result= get_left_quicklist_bits($cat_id, $category_id, $depth + 1);
and only the main categories should be displayed.
The font question. There are no font calls in the jquery.treeview.css file in the treeview so you will have to add them somehow. I do not know CSS well enough to guide you.
-
Danke für den Hinweis. Weis jemand anderes vielliecht wegen der Schrift bescheid?
-
Danke für den Hinweis. Weis jemand anderes vielliecht wegen der Schrift bescheid?
search in "templates/your template directory/quickscript/jquery.treeview.css":
.treeview li {
margin: 0;
padding: 3px 0pt 3px 16px;
}
and replace:
.treeview li a{
margin: 0;
padding: 3px 0pt 3px 3px;
font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight:bold;
color:green;
}
mfg Andi
-
Mille Grazie. Was würde ich nur ohne euch machen
-
Mille Grazie. Was würde ich nur ohne euch machen
vielleicht selber mal anfangen und das Gehirn einschalten :mrgreen: :mrgreen: :wink:
nobby
-
:twisted: :-P
Ich stehe mit PHP ziemlich auf Kriegsfuß, vorallem, wenn ich nicht selbst den Code geschrieben habe