|
Title: Tabs in Content Items Post by: Alejandro on October 21, 2006, 01:55:25 PM Using the following 2 mambots you can separate some of the blocks of the detailed content view.
Tabs in Content Items mambot (http://www.joomlaworks.gr/) from www.joomlaworks.gr (http://www.joomlaworks.gr/) Jogadgets (http://jogadgets.com/demonstration.html) For example you could put the custom fields and the image gallery in separate tabs, or even have each field group appear in a different tab if you use the custom placement of fields in templates. I saw a site using jReviews that is using this mambot and thought I would post it here. The limit is your imagination. It would be interesting to see what you can come up with and share with us. If you decide to use these addons in your commercial proyects please remember to click on their donate buttons! Title: Re: Tabs in Content Items Post by: sloane on October 25, 2006, 07:21:50 AM Hi,
it's a very interresting way. But could you please give us more details. I know this bot, and the only way I'm able to use it is to put this botcode in my contents : {tab=first tab} some text here {tab=other tab} some more text here {/tabs} So, I have to put this code manually in my content. Besides, with this method I'm not able to put JReviews's custom fields in a tab. Could you please explain (or copy a code example) how we can use this code directly in the JReview's com_content template ? Do you know if there is also a way to directly create in the this template a tab that call the bot code {mosloadposition user4} ? Thanks ;) Sloane Title: Re: Tabs in Content Items Post by: Alejandro on October 25, 2006, 07:27:14 AM I have not tried it, I will let the users to the trying so I can continue working ;)
In com_content.html do something like this: Quote <patTemplate:tmpl name="com_content" visibility="show" varscope="jreviewcontent" unusedvars="strip"> <!-- com_content.html --> <div id="JR_com_content"> <div id="itemdescription" class="JR_description contentheading"><patTemplate:translate>_JR_DESCRIPTION</patTemplate:translate></div> {tab=Specs} <patTemplate:tmpl name="cc1" type="simplecondition" requiredvars="customfields" varscope="jreviewcontent"> {CUSTOMFIELDS} </patTemplate:tmpl> {tab=Images} <patTemplate:link src="com_content_images" /> {/tabs} <patTemplate:link src="com_content_introimage" /> {INTROTEXT}<div style="clear:both;"><br />{FULLTEXT}</div> </div> </patTemplate:tmpl> Make sure the tab bot comes after jReviews. Title: Re: Tabs in Content Items Post by: sloane on October 25, 2006, 09:00:37 AM Hi,
thanks a lot for your answer. This week I've tried to put some code like this in com_content template (for JoGadget mambot code) and that wasn't working. Your example and the fact that JReview bot have to be placed before the others offers me a very big step in my project : now it's working very well with joomlaworks tab. I've also understand how we can use mambot code in patemplates. So, I also have Quote {tab=contents} {mosloadposition user4} and it's working very well to include some modules (that are in user4 position unsed by my templates) that I need inside a tab in my content zone of a JReviews content ! I've also test your 1.2 RC1, I know that it's not the right place to talk about it, but just one word : you're a king ;) ! This feature of average rating is really fine and very important for our project ! Thanks a lot for your hard work, congratulation for this very serious work with JReviews (separate files are very explicite for translation, templates etc.)... Best Regards Title: Re: Tabs in Content Items Post by: Alejandro on October 25, 2006, 09:03:37 AM I am glad that you made it work. It would be great if you can post some screenshots of how your content looks with the tabs so other's can understand what we are actually talking about!
Title: Re: Tabs in Content Items Post by: sloane on October 25, 2006, 09:22:53 AM Hi,
For the moment we're working on a local version of a website that can't be show. But I'll create an example with other contents that can be public specially to make this screen capture, as soon as possible. Another info : It's also working fine with JoGadget code tags. The tabs of JoGadgets allows longer title. An example with a first tab with intro, another with spec, a third that call my user4 modules : Quote {jgtabber} [tab ==About Product==] Product Informations {INTROTEXT} [/tab] [tab ==Spec.==] {CUSTOMFIELDS} [/tab] [tab ==Other contents about this product==] {mosloadposition user4} [/tab] {/jgtabber} Best Regards, Sloane Title: Re: Tabs in Content Items Post by: sloane on November 06, 2006, 05:47:44 AM Sorry I was busy this time,
here some snapshot to show the contents display in severals tabs... really great isn't it ? (http://sgechange.free.fr/Jreviews-tabs-1.png) (http://sgechange.free.fr/Jreviews-tabs-2.png) Title: Re: Tabs in Content Items Post by: Gamersea on November 16, 2006, 09:13:12 AM Could someone explain everything in steps?
And do I have to install both plugins/mambots or only 1? Thanks, I hope it's not to hard, I can also use this pretty good. Title: Re: Tabs in Content Items Post by: sloane on November 16, 2006, 09:33:55 AM hi Gamersea,
First, choose the tab "plug-in/mombot" you want, for example "JoGadget" or "Tabs in Content", the links are in the first message. After this, publish this mambot. Th enext step is to edit the jreview template "com_content.html". Put in it the code like the others message tell. At the end, just go to frontend and be happy with this tabs in your reviews !! Best Regards, Sloane Title: Re: Tabs in Content Items Post by: Gamersea on November 16, 2006, 09:37:16 AM hi Gamersea, It's so easy? ok, another question which one should I take? Have you tried them both? Which one do you like the most?First, choose the tab "plug-in/mombot" you want, for example "JoGadget" or "Tabs in Content", the links are in the first message. After this, publish this mambot. Th enext step is to edit the jreview template "com_content.html". Put in it the code like the others message tell. At the end, just go to frontend and be happy with this tabs in your reviews !! Best Regards, Sloane Thanks. Title: Re: Tabs in Content Items Post by: Alejandro on November 16, 2006, 09:53:05 AM I like the one used here:
http://softwaredb.net/index.php?option=com_content&task=view&id=75&Itemid=40 Title: Re: Tabs in Content Items Post by: Gamersea on November 16, 2006, 09:57:38 AM I think that is the Jogadgets one, I will think about which one I am going to use...
Title: Re: Tabs in Content Items Post by: Gamersea on November 16, 2006, 10:17:45 AM Ok, I installed and published the Joomla Works mambot,
But I don't get it where in the com_content template do I have to place this text? Quote <patTemplate:tmpl name="com_content" visibility="show" varscope="jreviewcontent" unusedvars="strip"> <!-- com_content.html --> <div id="JR_com_content"> <div id="itemdescription" class="JR_description contentheading"><patTemplate:translate>_JR_DESCRIPTION</patTemplate:translate></div> {tab=Specs} <patTemplate:tmpl name="cc1" type="simplecondition" requiredvars="customfields" varscope="jreviewcontent"> {CUSTOMFIELDS} </patTemplate:tmpl> {tab=Images} <patTemplate:link src="com_content_images" /> {/tabs} <patTemplate:link src="com_content_introimage" /> {INTROTEXT}<div style="clear:both;"><br />{FULLTEXT}</div> </div> </patTemplate:tmpl> If I replace the normal text by this one^ the fields are not showing up, If I put this text under the normal one it says this: pat-Notice: Template com_content already exists in com_content.html on line 17 pat-Notice: Template cc1 already exists in com_content.html on line 23 Can someone tell me were I have to put it? in the com_content.html file? Thanks Alot. Title: Re: Tabs in Content Items Post by: Alejandro on November 16, 2006, 10:26:47 AM Make sure the jReviews comment bot is before the tab bot.
Title: Re: Tabs in Content Items Post by: Gamersea on November 16, 2006, 10:29:45 AM This one: jreviews comment plugin it has order 0
and the tab bot: Tabs & Slides In Content Items has order 6 so that right. Or does the tab & slides needs to be standing on 0 and the comment plugin on 6? ------ After that the code you give, Do I have to replace the normal text with the text you gave me? Title: Re: Tabs in Content Items Post by: Gamersea on November 16, 2006, 02:29:21 PM Ok, I deleted the Joomlaworks one and installed the Jogadgets one no it seems that this one works better, However it still not working as you can see at the attachment you can see the fields tags but I have to be like here: http://softwaredb.net/index.php?option=com_content&task=view&id=75&Itemid=40
It should automaticly have the fieldgroups as tabs and under those tabs you can find the fields for that fieldgroup. So, I think the code in the com_content.html is not correct. Title: Re: Tabs in Content Items Post by: Gamersea on November 16, 2006, 02:41:24 PM Ok, I got it working now but not as I want:
I have this code: Quote <patTemplate:tmpl name="com_content" visibility="show" varscope="jreviewcontent" unusedvars="strip"> <!-- com_content.html --> <div id="JR_com_content"> <div id="itemdescription" class="JR_description contentheading"><patTemplate:translate>_JR_DESCRIPTION</patTemplate:translate></div> {jgtabber} [tab ==Beschrijving==] <patTemplate:link src="com_content_introimage" /> {INTROTEXT} [/tab] [tab ==Overige Informatie==] {CUSTOMFIELDS} [/tab] {/jgtabber} </patTemplate:tmpl> As you can see on the image But I want that there comes a tab automaticly for each field group so automatic a tab for Bedrijfsinformatie, a tab for Productaanbod , and a tab automatic for Webhosting mogelijkheden. And at the games I want automatic tabs for those fieldsgroups. same for shops automatic tabs for those fieldgroups so if I have the fieldgroup bedrijfsinformatie and a fieldgroup winkelinformatie I want autmatic a tab for bedrijfsinformatie and one for winkelinformatie. Right now all the fieldgroups are under the same tab. Title: Re: Tabs in Content Items Post by: Alejandro on November 16, 2006, 02:45:09 PM I am not a tabs expert and I have not tried any of these plugins. Having said that, you cannot have tabs for each field group unless you place all the fields by hand in your template and deselect the contentview option in the fields manager.
Always start simple. Try the tabs in content, even outside of jReviews and see if they work there, then put the same code in the com_content.hmtl template and see if it works there. Tab bot must come AFTER jReviews bot. It MIGHT be possible to have tabs for each custom field if you change the customfields.html template: {jgtabber} <patTemplate:tmpl name="group"> [tab =={GROUP_TITLE}==] <div id="JR_customfields-{CLASS}"> <patTemplate:tmpl name="group.title" type="simplecondition" requiredvars="group_title" varscope="group"> <div id="JR_group-{CLASS}">{GROUP_TITLE}</div> </patTemplate:tmpl> <patTemplate:tmpl name="row"> <patTemplate:tmpl name="custom.field" type="simplecondition" requiredvars="field_title" varscope="row"> <span id="JR_fieldtitle-{CLASS}">{FIELD_TITLE}</span>: </patTemplate:tmpl> <span id="JR_fieldvalue-{CLASS}">{FIELD_VALUE}</span><br /> </patTemplate:tmpl> </div> [/tab] </patTemplate:tmpl> {/jgtabber} I hope that helps. Title: Re: Tabs in Content Items Post by: Gamersea on November 16, 2006, 02:48:21 PM Will try that, Anyway it looks nicer and better now already.
Title: Re: Tabs in Content Items Post by: Alejandro on November 16, 2006, 02:49:13 PM I just edited the code above and put exactly what you should try. Let me know if it works.
Title: Re: Tabs in Content Items Post by: Gamersea on November 16, 2006, 02:55:32 PM So I have this in my customfields.html :
Quote <patTemplate:tmpl name="customfields" whitespace="trim"> <!-- customfields.html --> <div id="JR_customfields_outer-{CLASS}"> {jgtabber} <patTemplate:tmpl name="group"> [tab =={GROUP_TITLE}==] <div id="JR_customfields-{CLASS}"> <patTemplate:tmpl name="group.title" type="simplecondition" requiredvars="group_title" varscope="group"> <div id="JR_group-{CLASS}">{GROUP_TITLE}</div> </patTemplate:tmpl> <patTemplate:tmpl name="row"> <patTemplate:tmpl name="custom.field" type="simplecondition" requiredvars="field_title" varscope="row"> <span id="JR_fieldtitle-{CLASS}">{FIELD_TITLE}</span>: </patTemplate:tmpl> <span id="JR_fieldvalue-{CLASS}">{FIELD_VALUE}</span><br /> </patTemplate:tmpl> </div> [/tab] </patTemplate:tmpl> {/jgtabber} The other text of customfields.html no changes where made here so. Replace the text what wat standing there first by the text you gave me, But then I get this error: pat-Error Invalid closing tag pattemplate:tmpl, : expected in customfields.html on line 24 Title: Re: Tabs in Content Items Post by: Alejandro on November 16, 2006, 02:58:40 PM You have a lot of extra code there, use this and if it works please post the url or picture :)
Quote <patTemplate:tmpl name="customfields" whitespace="trim"> <!-- customfields.html --> <div id="JR_customfields_outer-{CLASS}"> {jgtabber} <patTemplate:tmpl name="group"> [tab =={GROUP_TITLE}==] <div id="JR_customfields-{CLASS}"> <patTemplate:tmpl name="group.title" type="simplecondition" requiredvars="group_title" varscope="group"> <div id="JR_group-{CLASS}">{GROUP_TITLE}</div> </patTemplate:tmpl> <patTemplate:tmpl name="row"> <patTemplate:tmpl name="custom.field" type="simplecondition" requiredvars="field_title" varscope="row"> <span id="JR_fieldtitle-{CLASS}">{FIELD_TITLE}</span>: </patTemplate:tmpl> <span id="JR_fieldvalue-{CLASS}">{FIELD_VALUE}</span><br /> </patTemplate:tmpl> </div> [/tab] </patTemplate:tmpl> {/jgtabber} </div> </patTemplate:tmpl> <patTemplate:tmpl name="multiple_options"> <patTemplate:tmpl name="option"> <patTemplate:tmpl type="condition" conditionvar="image" varscope="option"> <patTemplate:sub condition="noimage"><span id="JR_fieldvalue-{CLASS}">{TEXT}</span><patTemplate:tmpl name="separator" visibility="hidden"> •</patTemplate:tmpl></patTemplate:sub> <patTemplate:sub condition="default"> <IMG title="{TEXT}" alt="{TEXT}" src="{TEMPLATE_SITE}/{IMAGE}"> </patTemplate:sub> </patTemplate:tmpl> </patTemplate:tmpl> </patTemplate:tmpl> Title: Re: Tabs in Content Items Post by: Gamersea on November 16, 2006, 03:03:15 PM It works kinda, But now it only shows the bedrijfsinformatie info.
by the way I changed this: Quote <patTemplate:tmpl name="group"> This one ^ is the second image[tab =={GROUP_TITLE}==] to this: Quote <patTemplate:tmpl name="group"> this ^ is the first image (no space between tab and ==[tab=={GROUP_TITLE}==] Title: Re: Tabs in Content Items Post by: Alejandro on November 16, 2006, 03:08:32 PM Ok, I know this is possible but I will have to download the bot to give you the final answer :D
Title: Re: Tabs in Content Items Post by: Gamersea on November 16, 2006, 03:10:46 PM Ok, I know this is possible but I will have to download the bot to give you the final answer :D Ok, It's the Jogadgets botUpdate: On this moment with [tab =={GROUP_TITLE}==] code (so the wrong one I guess because the space) you also have the reviews inside the tab: Edit: Both the [tab =={GROUP_TITLE}==] code and the [tab=={GROUP_TITLE}==] code have the same problem as you can see on the image. edit: [tab =={GROUP_TITLE}==] is the good one, I just checked... Title: Re: Tabs in Content Items Post by: Alejandro on November 16, 2006, 03:41:34 PM This is the code that works:
Quote <patTemplate:tmpl name="customfields" whitespace="trim"> <!-- customfields.html --> {jgtabber} <div id="JR_customfields_outer-{CLASS}"> <patTemplate:tmpl name="group"> [tab =={GROUP_TITLE}==] <div id="JR_customfields-{CLASS}"> <patTemplate:tmpl name="group.title" type="simplecondition" requiredvars="group_title" varscope="group"> <div id="JR_group-{CLASS}">{GROUP_TITLE}</div> </patTemplate:tmpl> <patTemplate:tmpl name="row"> <patTemplate:tmpl name="custom.field" type="simplecondition" requiredvars="field_title" varscope="row"> <span id="JR_fieldtitle-{CLASS}">{FIELD_TITLE}</span>: </patTemplate:tmpl> <span id="JR_fieldvalue-{CLASS}">{FIELD_VALUE}</span><br /> </patTemplate:tmpl> </div> [/tab] </patTemplate:tmpl> </div> {/jgtabber} </patTemplate:tmpl> <patTemplate:tmpl name="multiple_options"> <patTemplate:tmpl name="option"> <patTemplate:tmpl type="condition" conditionvar="image" varscope="option"> <patTemplate:sub condition="noimage"><span id="JR_fieldvalue-{CLASS}">{TEXT}</span><patTemplate:tmpl name="separator" visibility="hidden"> •</patTemplate:tmpl></patTemplate:sub> <patTemplate:sub condition="default"> <IMG title="{TEXT}" alt="{TEXT}" src="{TEMPLATE_SITE}/{IMAGE}"> </patTemplate:sub> </patTemplate:tmpl> </patTemplate:tmpl> </patTemplate:tmpl> Title: Re: Tabs in Content Items Post by: Gamersea on November 16, 2006, 03:52:35 PM Do I have to replace the whole code by this code? If not can you post the whole code just like you did 3 posts above?
As I am not sure what text I have to replace as I see like 3 </patTemplate:tmpl> </patTemplate:tmpl> </patTemplate:tmpl> So I am not sure.... Thanks. Title: Re: Tabs in Content Items Post by: Alejandro on November 16, 2006, 04:33:05 PM I edited my previous post to put the whole code in customfields.html
Title: Re: Tabs in Content Items Post by: Alejandro on November 16, 2006, 04:51:23 PM Unfortunately I just noticed that in the lists you see the raw code for the tabs or in blog content you see the tabs as well because the same template is used there and there. The only way to avoid this is to NOT show the custom fields in lists by unchecking the listview option in the fields manager.
You can always show the fields if you enter the tag {JR_FIELDNAME} or if it's a multiple choice field you enter the code posted in the templates forum. The other thing you can do is what I said initially which is to build the whole tabs from scratch in your template putting the custom fields manually in the template. Good luck! Title: Re: Tabs in Content Items Post by: Gamersea on November 17, 2006, 01:14:01 AM hmm, Strange I changed the code in customfields.html but it's still the same.
By the way did you also change somethings in your com_content.html template things that I didn't changed because then I know that that is the problem if so could you also post or e-mail me your com_content.html template? Thanks. Title: Re: Tabs in Content Items Post by: Gamersea on November 17, 2006, 01:29:37 AM Well, I changed something in the com_content.html and it's almost showing up good.
This is the code now in com_content.html Quote <patTemplate:tmpl name="com_content" visibility="show" varscope="jreviewcontent" unusedvars="strip"> <!-- com_content.html --> <div id="JR_com_content"> <div id="itemdescription" class="JR_description contentheading"><patTemplate:translate>_JR_DESCRIPTION</patTemplate:translate></div> {jgtabber} [tab ==Beschrijving==] <patTemplate:link src="com_content_introimage" /> {INTROTEXT} [/tab] [tab ==Overige Informatie==] {CUSTOMFIELDS} [tab ==Overige==] {CUSTOMFIELDS} [/tab] {/jgtabber} </patTemplate:tmpl> But I also have a problem, Now if I try to post a editor review it says this, see image. Title: Re: Tabs in Content Items Post by: Gamersea on November 17, 2006, 01:50:15 AM sorry for double posts.
I got it working, This is my com_content.html template now: Quote <patTemplate:tmpl name="com_content" visibility="show" varscope="jreviewcontent" unusedvars="strip"> <!-- com_content.html --> <div id="JR_com_content"> <div id="itemdescription" class="JR_description contentheading"><patTemplate:translate>_JR_DESCRIPTION</patTemplate:translate></div> {jgtabber} [tab ==Informatie==] {CUSTOMFIELDS} {CUSTOMFIELDS} <patTemplate:link src="com_content_introimage" /> {INTROTEXT} </patTemplate:tmpl> <patTemplate:comment> the comment text here, I don't post it here. Ok, I got a next problem, Now if I press on the Write a review button for a editor the box doesn't show up and internet explorer says: ready, but with errors on the page. Ok, With firefox the box does show up, But when I submit the review I get a error, See the image called next problem1 Title: Re: Tabs in Content Items Post by: Alejandro on November 17, 2006, 07:10:09 AM This error is a bug in the unreleased version you are using. With regards to the tabs. The code I sent you worked perfect when I tried it, but if yours works as well, then good, but I don't understand why, my version of the code I understand :)
Title: Re: Tabs in Content Items Post by: Gamersea on November 17, 2006, 09:48:31 AM Well, Yeah it's working so!
Thanks for the fix! Title: Re: Tabs in Content Items Post by: Gamersea on November 17, 2006, 10:03:57 AM I changed the code again and I is still working and looking nicer the com_content.html code now:
Quote <patTemplate:tmpl name="com_content" visibility="show" varscope="jreviewcontent" unusedvars="strip"> <!-- com_content.html --> <div id="JR_com_content"> <div id="itemdescription" class="JR_description contentheading"><patTemplate:translate>_JR_DESCRIPTION</patTemplate:translate></div> {CUSTOMFIELDS} <patTemplate:link src="com_content_introimage" /> {INTROTEXT} </patTemplate:tmpl> As you can see I don't even have the {jabber} code in there and everything is still working fine, Look at the image to see the result. Title: Re: Tabs in Content Items Post by: Gamersea on November 17, 2006, 10:10:27 AM Another double post, Sorry.
Ok, If you also want it like me you have to change your com_content.html code to this: Quote <patTemplate:tmpl name="com_content" visibility="show" varscope="jreviewcontent" unusedvars="strip"> <!-- com_content.html --> <div id="JR_com_content"> <div id="itemdescription" class="JR_description contentheading"><patTemplate:translate>_JR_DESCRIPTION</patTemplate:translate></div> {CUSTOMFIELDS} <patTemplate:link src="com_content_introimage" /> {INTROTEXT} </patTemplate:tmpl> <patTemplate:comment> ***** HOW TO DISPLAY CUSTOM FIELDS IN TEMPLATE ***** For fields which accept only a single value (text, single select, radio buttons, textarea), you can use the field name: {JR_FIELDNAME} If it is a single select or radio button field and you have assigned images to the options you can use: {JR_FIELDNAME_IMG} For fields which accept multiple options (select multiple, checkboxes) you need to use the code below, and replace the word fieldname with the name of your field. You need to keep the suffixe _row in the template name. If you want to have access to the image field just add _IMG to the tag: {JR_FIELDNAME_IMG} and you can place it in the src of an <IMG> tag. <p a t Template:tmpl name="jr_fieldname_row" type="simplecondition" requiredvars="jr_fieldname"> {JR_FIELDNAME} {JR_FIELDNAME_IMG} <--- only if you have assigned images to the fields </p a t Template:tmpl> You can also use the {LANGUAGE} variable for images for multilingual sites. So you could name your images: english.{JR_FIELDNAME_IMG} spanish.{JR_FIELDNAME_IMG} But you need to make sure you don't enter a path in the image field in the backend, just the image name and then enter the full path here in the template. The {LIVE_SITE} variable can be used and contains: http://www.yourdomain.com </patTemplate:comment> and you need to change your customfields.html code to this: Quote <patTemplate:tmpl name="customfields" whitespace="trim"> <!-- customfields.html --> {jgtabber} <div id="JR_customfields_outer-{CLASS}"> <patTemplate:tmpl name="group"> [tab =={GROUP_TITLE}==] <div id="JR_customfields-{CLASS}"> <patTemplate:tmpl name="group.title" type="simplecondition" requiredvars="group_title" varscope="group"> <div id="JR_group-{CLASS}">{GROUP_TITLE}</div> </patTemplate:tmpl> <patTemplate:tmpl name="row"> <patTemplate:tmpl name="custom.field" type="simplecondition" requiredvars="field_title" varscope="row"> <span id="JR_fieldtitle-{CLASS}">{FIELD_TITLE}</span>: </patTemplate:tmpl> <span id="JR_fieldvalue-{CLASS}">{FIELD_VALUE}</span><br /> </patTemplate:tmpl> </div> [/tab] </patTemplate:tmpl> </div> {/jgtabber} </patTemplate:tmpl> <patTemplate:tmpl name="multiple_options"> <patTemplate:tmpl name="option"> <patTemplate:tmpl type="condition" conditionvar="image" varscope="option"> <patTemplate:sub condition="noimage"><span id="JR_fieldvalue-{CLASS}">{TEXT}</span><patTemplate:tmpl name="separator" visibility="hidden"> •</patTemplate:tmpl></patTemplate:sub> <patTemplate:sub condition="default"> <IMG title="{TEXT}" alt="{TEXT}" src="{TEMPLATE_SITE}/{IMAGE}"> </patTemplate:sub> </patTemplate:tmpl> </patTemplate:tmpl> </patTemplate:tmpl> But first you need to install Jogadgets mambot, The comment bot of Jreviews must be above the Jogadgets one so example: Jreviews comment bot Order: 1 Jogagdets bot Order: 2 or 3, 4, 6 etc. So now it's really simple, In this post you have everything you need. Title: Re: Tabs in Content Items Post by: Gamersea on November 17, 2006, 04:40:19 PM But, You also can have something else, See the images, This is also very nice.
If you want this you need to change your customfields.html to this: Quote <patTemplate:tmpl name="customfields" whitespace="trim"> <!-- customfields.html --> {jgaccordion} <div id="JR_customfields_outer-{CLASS}"> <patTemplate:tmpl name="group"> [acctab =={GROUP_TITLE}==] <div id="JR_customfields-{CLASS}"> <patTemplate:tmpl name="group.title" type="simplecondition" requiredvars="group_title" varscope="group"> <div id="JR_group-{CLASS}">{GROUP_TITLE}</div> </patTemplate:tmpl> <patTemplate:tmpl name="row"> <patTemplate:tmpl name="custom.field" type="simplecondition" requiredvars="field_title" varscope="row"> <span id="JR_fieldtitle-{CLASS}">{FIELD_TITLE}</span>: </patTemplate:tmpl> <span id="JR_fieldvalue-{CLASS}">{FIELD_VALUE}</span><br /> </patTemplate:tmpl> </div> [/acctab] </patTemplate:tmpl> </div> {/jgaccordion} </patTemplate:tmpl> <patTemplate:tmpl name="multiple_options"> <patTemplate:tmpl name="option"> <patTemplate:tmpl type="condition" conditionvar="image" varscope="option"> <patTemplate:sub condition="noimage"><span id="JR_fieldvalue-{CLASS}">{TEXT}</span><patTemplate:tmpl name="separator" visibility="hidden"> •</patTemplate:tmpl></patTemplate:sub> <patTemplate:sub condition="default"> <IMG title="{TEXT}" alt="{TEXT}" src="{TEMPLATE_SITE}/{IMAGE}"> </patTemplate:sub> </patTemplate:tmpl> </patTemplate:tmpl> </patTemplate:tmpl> Title: Re: Tabs in Content Items Post by: Gamersea on November 18, 2006, 05:50:23 AM If you also want to have a images gallery under a tab you need to change your customfields.html template to this:
Quote <patTemplate:tmpl name="customfields" whitespace="trim"> <!-- customfields.html --> <div id="JR_customfields_outer-{CLASS}"> <patTemplate:tmpl name="group"> [acctab =={GROUP_TITLE}==] <div id="JR_customfields-{CLASS}"> <patTemplate:tmpl name="group.title" type="simplecondition" requiredvars="group_title" varscope="group"> <div id="JR_group-{CLASS}">{GROUP_TITLE}</div> </patTemplate:tmpl> <patTemplate:tmpl name="row"> <patTemplate:tmpl name="custom.field" type="simplecondition" requiredvars="field_title" varscope="row"> <span id="JR_fieldtitle-{CLASS}">{FIELD_TITLE}</span>: </patTemplate:tmpl> <span id="JR_fieldvalue-{CLASS}">{FIELD_VALUE}</span><br /> </patTemplate:tmpl> </div> [/acctab] </patTemplate:tmpl> </div> </patTemplate:tmpl> <patTemplate:tmpl name="multiple_options"> <patTemplate:tmpl name="option"> <patTemplate:tmpl type="condition" conditionvar="image" varscope="option"> <patTemplate:sub condition="noimage"><span id="JR_fieldvalue-{CLASS}">{TEXT}</span><patTemplate:tmpl name="separator" visibility="hidden"> •</patTemplate:tmpl></patTemplate:sub> <patTemplate:sub condition="default"> <IMG title="{TEXT}" alt="{TEXT}" src="{TEMPLATE_SITE}/{IMAGE}"> </patTemplate:sub> </patTemplate:tmpl> </patTemplate:tmpl> </patTemplate:tmpl> and you com_content.html template to this: Quote <patTemplate:tmpl name="com_content" visibility="show" varscope="jreviewcontent" unusedvars="strip"> <!-- com_content.html --> <div id="JR_com_content"> {jgaccordion} <patTemplate:tmpl name="cc1" type="simplecondition" requiredvars="customfields" varscope="jreviewcontent"> {CUSTOMFIELDS} </patTemplate:tmpl> [acctab ==Gallery==] <patTemplate:link src="com_content_images" /> [/acctab] {/jgaccordion} <patTemplate:link src="com_content_introimage" /> {INTROTEXT} </patTemplate:tmpl> <patTemplate:comment> ***** HOW TO DISPLAY CUSTOM FIELDS IN TEMPLATE ***** For fields which accept only a single value (text, single select, radio buttons, textarea), you can use the field name: {JR_FIELDNAME} If it is a single select or radio button field and you have assigned images to the options you can use: {JR_FIELDNAME_IMG} For fields which accept multiple options (select multiple, checkboxes) you need to use the code below, and replace the word fieldname with the name of your field. You need to keep the suffixe _row in the template name. If you want to have access to the image field just add _IMG to the tag: {JR_FIELDNAME_IMG} and you can place it in the src of an <IMG> tag. <p a t Template:tmpl name="jr_fieldname_row" type="simplecondition" requiredvars="jr_fieldname"> {JR_FIELDNAME} {JR_FIELDNAME_IMG} <--- only if you have assigned images to the fields </p a t Template:tmpl> You can also use the {LANGUAGE} variable for images for multilingual sites. So you could name your images: english.{JR_FIELDNAME_IMG} spanish.{JR_FIELDNAME_IMG} But you need to make sure you don't enter a path in the image field in the backend, just the image name and then enter the full path here in the template. The {LIVE_SITE} variable can be used and contains: http://www.yourdomain.com </patTemplate:comment> Title: Re: Tabs in Content Items Post by: Gamersea on November 21, 2006, 02:48:24 PM Well, Alejandro requested to also have a gallery, I though it would be a good idea however with my first few try's it didn't worked out but today I though, I change back everything because I want a video tab so I changed the com_content template and now it worked out how I want it and how Alejandro want it.
If you want to have several tabs you need to change your com_content.html to this: Quote <patTemplate:tmpl name="com_content" visibility="show" varscope="jreviewcontent" unusedvars="strip"> <!-- com_content.html --> <div id="JR_com_content"> <div id="itemdescription" class="JR_description contentheading"><patTemplate:translate>_JR_DESCRIPTION</patTemplate:translate></div> <patTemplate:link src="com_content_introimage" /> {INTROTEXT} {jgtabber} [tab ==Overige Informatie==] {CUSTOMFIELDS} [/tab] [tab ==Gallery==] <patTemplate:link src="com_content_images" /> [/tab] {/jgtabber} </patTemplate:tmpl> <patTemplate:comment> ***** HOW TO DISPLAY CUSTOM FIELDS IN TEMPLATE ***** For fields which accept only a single value (text, single select, radio buttons, textarea), you can use the field name: {JR_FIELDNAME} If it is a single select or radio button field and you have assigned images to the options you can use: {JR_FIELDNAME_IMG} For fields which accept multiple options (select multiple, checkboxes) you need to use the code below, and replace the word fieldname with the name of your field. You need to keep the suffixe _row in the template name. If you want to have access to the image field just add _IMG to the tag: {JR_FIELDNAME_IMG} and you can place it in the src of an <IMG> tag. <p a t Template:tmpl name="jr_fieldname_row" type="simplecondition" requiredvars="jr_fieldname"> {JR_FIELDNAME} {JR_FIELDNAME_IMG} <--- only if you have assigned images to the fields </p a t Template:tmpl> You can also use the {LANGUAGE} variable for images for multilingual sites. So you could name your images: english.{JR_FIELDNAME_IMG} spanish.{JR_FIELDNAME_IMG} But you need to make sure you don't enter a path in the image field in the backend, just the image name and then enter the full path here in the template. The {LIVE_SITE} variable can be used and contains: http://www.yourdomain.com </patTemplate:comment> And your customfields.html to this: Quote <patTemplate:tmpl name="customfields" whitespace="trim"> <!-- customfields.html --> {jgaccordion} <div id="JR_customfields_outer-{CLASS}"> <patTemplate:tmpl name="group"> [acctab =={GROUP_TITLE}==] <div id="JR_customfields-{CLASS}"> <patTemplate:tmpl name="group.title" type="simplecondition" requiredvars="group_title" varscope="group"> <div id="JR_group-{CLASS}">{GROUP_TITLE}</div> </patTemplate:tmpl> <patTemplate:tmpl name="row"> <patTemplate:tmpl name="custom.field" type="simplecondition" requiredvars="field_title" varscope="row"> <span id="JR_fieldtitle-{CLASS}">{FIELD_TITLE}</span>: </patTemplate:tmpl> <span id="JR_fieldvalue-{CLASS}">{FIELD_VALUE}</span><br /> </patTemplate:tmpl> </div> [/acctab] </patTemplate:tmpl> </div> {/jgaccordion} </patTemplate:tmpl> <patTemplate:tmpl name="multiple_options"> <patTemplate:tmpl name="option"> <patTemplate:tmpl type="condition" conditionvar="image" varscope="option"> <patTemplate:sub condition="noimage"><span id="JR_fieldvalue-{CLASS}">{TEXT}</span><patTemplate:tmpl name="separator" visibility="hidden"> •</patTemplate:tmpl></patTemplate:sub> <patTemplate:sub condition="default"> <IMG title="{TEXT}" alt="{TEXT}" src="{TEMPLATE_SITE}/{IMAGE}"> </patTemplate:sub> </patTemplate:tmpl> </patTemplate:tmpl> </patTemplate:tmpl> then you can have this result: You can even have videos, And if you install the all in one video plugin you can even have vids in tabs! (http://img127.imageshack.us/img127/7041/evenvideosfq4.jpg) Title: Re: Tabs in Content Items Post by: andreasa on November 22, 2006, 03:09:21 AM Thank you for shared your work!
Title: Re: Tabs in Content Items Post by: bdl888 on January 25, 2007, 05:29:34 PM Question: How can I automatically hide some tabs if they are empty? ???
Title: Re: Tabs in Content Items Post by: Alejandro on January 25, 2007, 11:35:51 PM Question: How can I automatically hide some tabs if they are empty? ??? You can try a conditional template wrapping the mambot code and include all the custom fields as required variables: <patTemplate:tmpl name="tab" type="condition" requiredvars="jr_name1,jr_name2,jr_name3" useGlobals="true"> mambot code </patTemplate:tmpl> Title: Re: Tabs in Content Items Post by: bdl888 on January 26, 2007, 01:31:23 AM Thank you. You are so great!
I just had to change type="condition" to type="simplecondition" to make it work. You can try a conditional template wrapping the mambot code and include all the custom fields as required variables: <patTemplate:tmpl name="tab" type="condition" requiredvars="jr_name1,jr_name2,jr_name3" useGlobals="true"> mambot code </patTemplate:tmpl> Title: Re: Tabs in Content Items Post by: andreasa on January 26, 2007, 05:06:40 AM I have insert a lot of information inside the tab tags, so maybe some visitor with 56k connectivity need time before see the tabs.
I would like insert a little loading script in order to advise the visitor that someting is arriving. What's about the jreviews loading script? Do you think is possible insert it in content page? Thank you in advance Title: Re: Tabs in Content Items Post by: Alejandro on January 26, 2007, 08:28:00 AM No, the loading script is for ajax calls to the server, which is not what the tabs are doing. You would have to figure some other way by doing it directly in the tab mambot.
Title: Re: Tabs in Content Items Post by: popolvuh on February 27, 2007, 10:52:42 PM Hello there!
Everybody knows that these mambots have content elements for use in joom!fish, like jreviews? Thanks! Title: Re: Tabs in Content Items Post by: Alejandro on February 27, 2007, 10:57:13 PM Edited: my mistake I thought you had created a new post! :-[
But you should really ask the mambot developer about this. Title: Re: Tabs in Content Items Post by: lonniev on March 06, 2007, 08:20:48 PM I really like sloane's clean "Lord of the Rings" tabbed review template. Can I have a copy?
Also, I'm just getting started with jReview and have yet to figure out how to do the templating for it. Where does one store the template file for the List-of-Reviews and for the Per-Review views? Title: Re: Tabs in Content Items ( urgent assistentce) Post by: Sportsbrite on August 16, 2007, 04:44:13 PM I am working on the tab issue with the tab bot from joomla works.
In the content part of jreviews I am trying to get Editors review and user review in the tab section of my website see http://www.championshipproductions.eu/basketball/fastbreak/how-to-build-a-winning-fastbreak.html I wish all the tabs to appear on the top including editors and user reviews. Which code will I need to ad in the com_content to make this happen.?? Title: Re: Tabs in Content Items Post by: Alejandro on August 16, 2007, 05:02:18 PM You need to place the tabs in jreviewcontent.html
please don't submit a post and a ticket, one is enough. Title: Re: Tabs in Content Items Post by: Sportsbrite on August 17, 2007, 06:31:19 AM Alejandro please have a look at the above you can see I have published the tabs in a good manner no I want to have User review and editor sections displayed under the tabs listed Review users and editors tab in com_content.
Thank you and sorry for duplicate posts Title: Re: Tabs in Content Items Post by: Alejandro on August 17, 2007, 08:40:05 AM You didn't put the tabs in jreviewcontent.html, but that's ok. Now you need to move (read cut/paste) from jreviewcontent.html these lines and put them where you want:
Quote <div id="author_review_header"><patTemplate:link src="author_review_header" /></div> <div id="author_review_detail"><patTemplate:link src="author_review_detail" /></div> <patTemplate:link src="author_review_form" /> <div id="user_reviews_page"><patTemplate:link src="user_reviews_page" /></div> Title: Re: Tabs in Content Items Post by: Sportsbrite on August 17, 2007, 05:42:37 PM To be sure can I place these codes in com_content. I tried that but the page won't load it then only shows the Title and besides that nothing.
Does it has to do something wether you use the Moo or regular tamplate Title: Re: Tabs in Content Items Post by: Alejandro on August 17, 2007, 08:17:22 PM I can see your template here:
http://www.championshipproductions.eu/components/com_jreviews/tmpl/store/com_content.html when I view the page source and I don't see the changes I mentioned, can you redo them and let me know. It doesn't matter if you are using mootools or not. Title: Re: Tabs in Content Items Post by: Sportsbrite on August 18, 2007, 02:44:22 AM Dear Alejandro
Thank you for your Quick support. Pleaqse have a look I have made the changes but the com_content except the title doesn't show. Again thank you what did you think of the use of tabs with your great component. I am also having torubles with modules that won't show in specific area'such as a category or link from sections navigation When I am finished I will publish the code in this forum Title: Re: Tabs in Content Items Post by: Alejandro on August 18, 2007, 06:31:39 PM You don't see anything because you wiped out everything from jreviewcontent.html (except credits), not just the lines I mentioned before. You need to keep this one!
<patTemplate:link src="com_content" /> Title: Re: Tabs in Content Items Post by: Alejandro on August 18, 2007, 08:07:44 PM Please create a new post for the module issue and describe in detail what you want to do and what it's doing now.
Title: Re: Tabs in Content Items Post by: crystalitc on October 19, 2007, 04:52:40 AM Hi,
Thanks for all your contributions. I have some of the tabes working. If I add more it does not show in the front. Code: <patTemplate:tmpl name="com_content" visibility="show" varscope="jreviewcontent" unusedvars="strip"> <!-- com_content.html --> <div id="jr_com_content"> <patTemplate:tmpl name="cc1" type="simplecondition" requiredvars="customfields" varscope="jreviewcontent"> <br/> {tab=Information} <table width="650" border="0"> <tr> <td width="611" align="left" valign="top"> <patTemplate:link src="com_content_introimage" />{CUSTOMFIELDS}</td> <td width="29"> </td> </tr> <tr> <td align="left" valign="top">{INTROTEXT}<br/>{FULLTEXT}</td> <td align="left" valign="top"></td> </tr> </table> </patTemplate:tmpl> {tab=Gallery} <patTemplate:link src="com_content_images" /> <patTemplate:tmpl name="tab" type="simplecondition" requiredvars="JR_RESTAURANTEMENU,JR_RESTAURANTWINEMENU" useGlobals="true"> {tab=Menus} {slide=Food Menus} {JR_RESTAURANTEMENU} {/slide} {slide=Wine Menus} {JR_RESTAURANTWINEMENU} {/slide} <patTemplate:tmpl name="tab1" type="simplecondition" requiredvars="JR_RESTAURANTSPECIALS,JR_RESTAURANTCOUPONS" useGlobals="true"> {tab=Specials} {slide=Specials} {JR_RESTAURANTSPECIALS} {/slide} {slide=Coupons} {JR_RESTAURANTCOUPONS} {/slide} <patTemplate:tmpl name="tab2" type="simplecondition" requiredvars="JR_HOTELSPECIALOFFERS,JR_ACCOMMODATIONCOUPONS" useGlobals="true"> {tab=Specials 1} {slide=Specials 1} {JR_HOTELSPECIALOFFERS} {/slide} {slide=Coupons 1} {JR_ACCOMMODATIONCOUPONS} {/slide} {/tabs} </patTemplate:tmpl> </patTemplate:tmpl> </patTemplate:tmpl> </patTemplate:tmpl> </div> </patTemplate:tmpl> It works here for a restaurant listing:http://www.travelshopireland.com/resturant-directory/kerry-restaurants/mozart%27s-bistro-tralee.html (http://www.travelshopireland.com/resturant-directory/kerry-restaurants/mozart%27s-bistro-tralee.html) It is displaying the "tab1" pat template code - Specials and coupons It does not show for a hote listing l - the "tab2" pat template code. It should show on the hotel listing. http://www.travelshopireland.com/featured-accommodation/bed-and-breakfast/ballykisteen-lodge-tipperary-monard.html (http://www.travelshopireland.com/featured-accommodation/bed-and-breakfast/ballykisteen-lodge-tipperary-monard.html) It is identical (Tab1and tab2) - why does it work for one and not the other? Any Ideas? Glenn Title: Re: Tabs in Content Items Post by: Alejandro on October 19, 2007, 07:11:21 AM Try changing useGlobals="true" with varscope="jreviewcontent". There is a bug in patTemplate, it seems, that does not evaluate the global variables correctly for the template conditions. Also try simply removing the conditions to see if that's the case.
Title: Re: Tabs in Content Items Post by: crystalitc on October 20, 2007, 03:36:53 AM Hi,
I have tried everything not showing the hotel ones? Proberbly something simple. Regards Glenn Title: Re: Tabs in Content Items Post by: sunnyjey on September 06, 2008, 03:43:52 AM I dont know whether to start new thread or append to this tabs thread.
I want to know: How to put Groups in the tabs ? thank you.. Title: Re: Tabs in Content Items Post by: Alejandro on September 06, 2008, 05:14:22 PM You must code each tab individually and add each field to the corresponding tab. There's no direct way of doing this. For field layout customization search the knowledge base.
Title: Re: Tabs in Content Items Post by: theprincy on November 11, 2008, 09:43:14 AM I installed the plug, insert the code {tab=first tab} some text here {tab=test} zzzzzz {/tabs} into the file content.html but only thing that appears is the code, it appears that the mambots not be drawn as to solve Title: Re: Tabs in Content Items Post by: Alejandro on November 11, 2008, 10:23:20 AM A condition to get support in this forum is that your forum e-mail matches your client area e-mail. Please update it.
Title: Re: Tabs in Content Items Post by: theprincy on November 11, 2008, 10:37:16 AM i have update my profile , but email not use a long time
Title: Re: Tabs in Content Items Post by: Alejandro on November 11, 2008, 10:44:12 AM Thanks. Make sure that 1) The mambot is published and that it works outside of jReviews 2) In the mambots manager, the jReviews mambot is ordered first (above) the tabs mambot.
Title: Re: Tabs in Content Items Post by: theprincy on November 11, 2008, 10:55:20 AM grazie , supporto veramente efficiente ;D
good thanks i resolved Title: Re: Tabs in Content Items Post by: EzerchE on November 16, 2008, 08:58:40 PM where is the file should we add the tab codes? i looked in to /components/com_jreviews/jreviews/views/themes/default/ etc. but i didnt found com_content.html file. i am using joomla 1.5
Title: Re: Tabs in Content Items Post by: Alejandro on November 16, 2008, 10:15:14 PM You are looking in the wrong place. This is a jReviews 1.x board. Please find a similar post in the jReviews 2.x tips & tricks and also watch the theme video tutorials. The file is /listings/detail.thtml
Powered by SMF 1.1.7 |
SMF © 2006-2008, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com |