RSjoomla!

My Account






Lost Password?
No account yet? Register

Newsletter Subscribe

If you would like to be one of the first people to hear about the release of our new components then make sure you have subscribed to our announcements list! We won't bug you with unnecessary stuff.




RSjoomla! Board
These forums are to discuss any RSjoomla! related questions. Please note that official support is offered via Customer Support Ticketing System only, responses in the forum are not guaranteed.
Welcome, Guest
Please Login or Register.
Lost Password?
clicking on a category or ad loses template/module (1 viewing)
_GEN_GOTOBOTTOM Post Reply

TOPIC: clicking on a category or ad loses template/module

#1726
lynnwinks (User)
Fresh Boarder
Posts: 6
graphgraph
clicking on a category or ad loses template/module 2008/01/28 03:49 Karma: 0  
bug: clicking on a category or ad loses template/module associations

summary: i have a public template and private template. likewise, I have 3 menus which show when the user is on public pages, and 3 different menus which show when the user is on private pages. i have successfully installed rsads, loaded the default data, and set up a link to it. when i click the link, all is well - the correct template and modules show. When I click on a category, the template goes to the site default template, and the modules which have been assigned to all 'unassigned' links show.

expectation: if I assigned 'template B' and 'module B' to show when the RSAds link is clicked on the menu, template B and module B should continue to show if and when a link is clicked to go to an ad category or item.
Peace,
James
  The administrator has disabled public write access.
#1728
lynnwinks (User)
Fresh Boarder
Posts: 6
graphgraph
Re:clicking on a category or ad loses template/mod 2008/01/28 04:12 Karma: 0  
OK, I already found what you need to do to fix it, and I'm sure I'll probably find the code in the php file which outputs the links so they can be fixed too, but I digress.

When you set up the link to a component, it normally gets an ItemId parameter, so the URL looks like this: http://domain.com/component/option,com_rsads/Itemid,93/

The ItemId parameter gives Joomla! the info it needs to display the correct template and modules. When the links within the component framework don't replicate the ItemId parameter in the URL before the task parameter, Joomla! serves up the deafault template and modules assigned to show when the page/component is 'unassigned' (not assigned to anything).

When I click on one of the categories in RSAds, it goes to a URL like http://domain.com/component/option,com_rsads/task,categories.details/cid,33/

Simply grabbing the ItemId param from the first url and pasting it into the second URL before the task param solves the issue. E.g. http://domain.com/component/option,com_rsads/Itemid,93/task,categories.details/cid,33/

So the next question is where to patch the code. I'll give you Karma if you post the answer here before I do.
Peace,
James
  The administrator has disabled public write access.
#1731
lynnwinks (User)
Fresh Boarder
Posts: 6
graphgraph
Re:clicking on a category or ad loses template/mod 2008/01/28 07:05 Karma: 0  
OK, I thought I could use svn to create a patch without beeing hooked up to an SVN server, but apparently I'm an idiot. I'm sure there's a way but I'm not an SVN expert.

Anyway, I'm attaching the rsads.html.php patched version. Here's what I did:

  1. found all code that was creating a link and made sure Itemid parameter gets set

  2. added global $Itemid to every function that needed it

  3. removed the word 'tesssssssssst' at the end of the file (see http://www.rsjoomla.com/index.php/RSads-Bugs/1730-bug-tessssssst-displayed-on-EVERY-PAGE-of- RSA.html)

  4. changed all the literal references to com_rsads and replaced with $option function parameter for maximum portability

  5. converted s few lines which used "" strings to '' strings for consistency


File Attachment:
File name: rsads.txt
File size:39243 bytes


Post edited by: jrevillini, at: 2008/01/28 05:06
Peace,
James
  The administrator has disabled public write access.
_GEN_GOTOTOP Post Reply
© Copyright 2007 Best of Joomla, Powered by FireBoardget the latest posts directly to your desktop