Joomla! Discussion Forums



It is currently Fri Nov 27, 2009 10:08 pm (All times are UTC )

 




Post new topic Reply to topic  [ 2 posts ] 
Author Message
Posted: Thu Sep 24, 2009 8:08 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Fri Dec 09, 2005 6:18 pm
Posts: 126
Location: England
Hi,

I am currently making a few DOCman modules/plugins, one module is select boxes populated from DOCman based on module settings and is nearly done, the other module is a tree menu based on DOCman categories that is used as the menu or if the page is loaded on a specific category from another link then the tree expands to the correct category based on the url as iff it was used to choose the page.

The plugin allows the user to enter the category to show and an option to show that category only or sub categories under that category. It also then outputs the documents that are applicable to the above and based on the current user access (The same as my module) but in my module i use the standard DOCman menu/page as the tree is on the same page and i then get the correct category from the url to open the tree on the correct node.

What i want to do in the plugin (Which will run inside a tabset) is show the tree of the categories and the table of documents based on the plugin paramters from the user (I have done this) but when they click on a category in the tree i want to reload the current page and the tab but with the new documents and the correct tree node highlighted NOT go to the standard DOCman menu/page.

So far i have the tree, the table, the tree categories/documents based on the user access but the url part is being a pain.

Currently i have set the tree node urls to take the current url as below:
Code:
($current_url = $_SERVER['REQUEST_URI'])


I then add the part below onto the url based on the node:
Code:
$href = $current_url ."/?selectedfolder={$catrow->id}"; // URL for the Tree category item


Which adds the above and the ID as required which i read back to then highlight the tree and requery the table to get the correct documents but the problems are:

1) If i then click another category it appends the same string with the new ID to the existing url so i then have "original url/?selectedfolder=1/?selectedfolder=2" which gets very long after clicking on a few categories!!!!

2) The url is then not very nice, what i want is to have the "original url of the page (This will be used on various pages)/?selectedfolder=DOCman Pathway (So for category 3 it would be "/?selectedfolder=71-cat+1/72-cat+2/73-cat+3" where the spaces are replaced with + (The same as normal DOCman urls except the + part)) and then i can use the url (The current category) to requery the table and update the tree state

3) Is there a way to remove the "cat_view" part of the DOCman urls'??

4) Is there a way to remove the ID's in the DOCman url so the above would then be "/?selectedfolder=cat+1/cat+2/cat+3" using something like the HP router extension for Joomla

Thanks

Dan

_________________
My Extensions - http://www.dysolutions.co.uk/joomla


Top
  E-mail  
 
Posted: Fri Nov 06, 2009 6:58 am 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Fri Sep 09, 2005 2:13 pm
Posts: 6776
Location: The Netherlands
Mod Note: PLease don't bump your topics! It's against forum rules.
Removed your bump for now.

_________________
Robert Dam - Joomla Forum Moderator
Dutch Boards | Joomla Coding Boards | English Support Boards


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

Quick reply

 



Who is online

Users browsing this forum: thlas77 and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group