×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Displaying Comment plugin selectively within sub-tab

Displaying Comment plugin selectively within sub-tab 14 years 9 months ago #5159

  • Kiran
  • Kiran's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
I'm using 2 Joomla1.5 content plug-in components (jReviews and JoomlaComments) and the reviews and comments get displayed one below the other in the articles - see e.g. on
www.responsiblespender.com/joomla/compon...69-microsoft-office-

Would like to show only 1 plug-in at a time by having 2 sub-tabs within each article and display Reviews (default sub-tab) or Comments (if the user selects this sub-tab), not both.

Pl. suggest the best way to customize? Can the sub-tabs be built into each article? How do i display each plug-in selectively based on which sub-tab the user selects? (Ideally, would like to do this without modifying the JoomlaComments or jReviews code)

thanks
Kiran

Displaying Comment plugin selectively within sub-tab 14 years 9 months ago #5170

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
Kiran wrote:

(Ideally, would like to do this without modifying the JoomlaComments or jReviews code)


I think, unfortunately, it's impossible (or beyond my skill at least). We could implement code in JoomlaComment to check for JReviews and then put the entire component inside another DIV layer (which would go in the second tab) but that would depend on JReviews being already completely rendered before JoomlaComment even started - that'd be too hard to do because JoomlaComment is executed onPrepareContent.

It'd require a brand-new plugin that combines both the extensions into one... I can't imagine how much trickery and hacks it'd take.

I understand your concern though about the layout, it's not very efficient the way you have it and as far as I know there is no way to do it. However, since i'm interested in this too (I plan to use a Review component of some sort myself alongside JoomlaComment) I will investigate this mission further ;)

...who knows, maybe JoomlaComment itself will have review capability in a future version :lol:

Displaying Comment plugin selectively within sub-tab 14 years 9 months ago #5203

  • Kiran
  • Kiran's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
There's a solution that seems to work
- install the "Tabs and Sliders for content" plug-in from Joomlaworks - www.joomlaworks.gr/content/view/15/42/
- insert {tab=Comments} and {/tab} just before and after the Comments HTML code - this puts Comments section inside an AJAX tab. This has worked with jReviews - www.reviewsforjoomla.com/forum/index.php...91.msg26187#msg26187

-> However, i'm not sure where to include these tabs within the JoomlaComments plugin files? I tried at the beginning and end of the template file, but it disrupts the template.
Any suggestions? I tried inserting the {tab=Comments} at the end of jReviews plug-in, but it shows comments under both Reviews and Comments tab - an example of this - www.responsiblespender.com/joomla/compon...-os/68-red-hat-linux

Displaying Comment plugin selectively within sub-tab 14 years 9 months ago #5429

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
Kiran,

Thanks a lot for sharing this!

I will work on making an option to check (or manually enable) Tabs and Sliders for content support in JoComment. I will investigate the code though to find out where exactly to put some hard code for you.

I'm sure it has something to do with squeezing those tab tags into some of the many html = variable assignments in comment.class.php, but it may be very hard to do because JoComment is executed onpreparecontent and it could be before the Tabs/Sliders addon executes :unsure:

Displaying Comment plugin selectively within sub-tab 14 years 9 months ago #5459

  • Kiran
  • Kiran's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
Hi,

There's another issue - not sure if the tabs are SEO-friendly as they use Jscript (it'd be a disaster if the crawlers cannot read the comments behind the sub-tabs).

Could someone do a quick check and let me know? (you could check the HTML source code in my page - i've posted the URL earlier in this thread) I used the lynx browser to see - it seems to read content behind the sliders but not the tabs

thanks
Kiran

Displaying Comment plugin selectively within sub-tab 14 years 9 months ago #5466

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
I remember there is a tool to simulate a search engine bot crawling your site, but I can't remember what it was :(

Well if Lynx browser can't see them, that's not good at all. We should probably contact the creator of the Tabs and Sliders for content extension to try and improve it, I know it can be done but it's out of my league sadly.

Displaying Comment plugin selectively within sub-tab 14 years 9 months ago #5688

  • Kiran
  • Kiran's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
Hi Jonus,
Did you have a chance to investigate where in the comment.class.php code to insert the tab tags? I believe i've set the order of the Tabs&Sliders plugin to run after the Reviews and Comments plugins - so, it will catch the tab tags spit out by the Comments code.

Any inputs will be helpful - i can test it on my site - www.responsiblespender.com/joomla/compon...69-microsoft-office-

thanks
kiran

JonusC wrote:

Kiran,

Thanks a lot for sharing this!

I will work on making an option to check (or manually enable) Tabs and Sliders for content support in JoComment. I will investigate the code though to find out where exactly to put some hard code for you.

I'm sure it has something to do with squeezing those tab tags into some of the many html = variable assignments in comment.class.php, but it may be very hard to do because JoComment is executed onpreparecontent and it could be before the Tabs/Sliders addon executes :unsure:

Displaying Comment plugin selectively within sub-tab 14 years 8 months ago #5736

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
Sorry, I have not yet Kiran.

I am also building my personal website via XAMPP locally to test, but thanks - i'll be sure to reply here when some progress is made.

Top priority is compatibility and bug fixes right now though... I can't predict when i'll have a chance to look and play with this.
  • Page:
  • 1
Time to create page: 0.227 seconds