Support Center

Knowledgebase
View categorized listing of all common frequently asked questions.
Video Tutorials
Create a Movie & TV Show review website.
Customize the jReviews themes.
Review user profiles with the Everywhere addon.
Forum
Community forum
Submit a Ticket
Use your client area email to access the ticket system.
Downloads
Guides, modules and more...
 
Welcome, Guest. Please login or register.
Did you miss your activation email?
January 07, 2009, 06:15:35 PM
22792 Posts in 5220 Topics by 2975 Members
Latest Member: tonio
News: Do not post any jReviews files or large amounts of code in the forums please. Only template files and code are allowed.
 
jReviews Support Forum  |  jReviews 1.x - jReviews Modules and Hook Components  |  Modules & bots  |  Module Class suffix problem? « previous next »
Pages: [1]
Author Topic: Module Class suffix problem?  (Read 1595 times)
Xi7
Newbie
*
Offline Offline

Posts: 5


« on: August 24, 2006, 04:35:04 PM »

Hi,

Thanks for the module, promises to be very useful.

However, I think there may be an error in that the Module Class suffix is not being appended to the actual module class but is added later as a separate class of its own.

My css requires the following structure:
Code:
<div class="moduledark">
<div><div><div>
<h3>Title</h3>
MODULE CONTENT
</div></div></div>
</div>

Whereas the pattemplate is giving the following structure:
Code:
<div class="module">
<div><div><div>
<h3>Top Editor Rated</h3>
<div class="dark" width="100%">
THE MODULE CONTENT
</div>
</div></div></div>
</div>

Am I right in thinking that this is the way it should be working or have I got the wrong end of the stick here?

Thanks
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 9002


« Reply #1 on: August 24, 2006, 04:38:40 PM »

You are probably right. I added the class on its own, not as a suffix. But this should be very easy to change, just open the module's html file and prepend "module" to {CLASS}, so it will be like this:

class="module{CLASS}"

I hope that works.

Edited: actually, I don't think that will work, since the class is for whatever is already inside the module. You can also try editing the xml file and renaming "class" to "moduleclass_sfx".
« Last Edit: August 24, 2006, 04:43:39 PM by jReviews » Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
Xi7
Newbie
*
Offline Offline

Posts: 5


« Reply #2 on: August 26, 2006, 12:31:35 PM »

Thanks,

Renaming to moduleclass_sfx sorted that out perfectly.
Logged
Xi7
Newbie
*
Offline Offline

Posts: 5


« Reply #3 on: August 27, 2006, 09:38:22 PM »

And in addition, this might be useful head start to anyone using modules with a template from one of the good template vendors (mine is a joomlashack one) using the <div><div><div> configuration.

Replace the modules/mod_jrdashboard.html contents with this and things will look a little more like you want them to. Adjust from there til you're happy.

Code:
<pattemplate:tmpl name="module.1" whitespace="strip" unusedvars="strip">
<pattemplate:tmpl name="module.1.list">
<ul>
<pattemplate:tmpl name="module.1.element">
<li>
<pattemplate:tmpl name="module.1.numbers" type="simplecondition" requiredvars="count" varscope="module.1.element">
<b>{COUNT}.</b>&nbsp;&nbsp;
</pattemplate:tmpl>
<pattemplate:tmpl name="module.1.img" type="simplecondition" requiredvars="imgurl,img" varscope="module.1.element">
<a href="{IMGURL}"><img style="padding: 2px; border: 1px solid #CCC;" width="{IMGWIDTH}" border="0" src="{IMG}" /></a>
</pattemplate:tmpl>
<a href="{URL}">{TITLE}</a>
<pattemplate:tmpl name="module.1.category" type="simplecondition" requiredvars="cattitle,caturl" varscope="module.1.element">
<br />
<small>Category: <a href="{CATURL}">{CATTITLE}</a></small>
</pattemplate:tmpl>
</li>
</pattemplate:tmpl>
</pattemplate:tmpl>
<pattemplate:tmpl name="module.1.more" type="simplecondition" requiredvars="moreurl" varscope="module.1">
<li><a href="{MOREURL}">Show more...</a></li>
</pattemplate:tmpl>
</ul>
</pattemplate:tmpl>
<pattemplate:tmpl name="module.1.empty">
<p align="center">No items found</p>
</pattemplate:tmpl>

If it saves you some time, great. If you are at a loss as to what to do with the extra time - do a search and some reading on ethical banking (optional).
« Last Edit: August 27, 2006, 09:47:13 PM by Xi7 » Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 9002


« Reply #4 on: August 27, 2006, 10:37:36 PM »

What problem did you have with the original template? This solution does not work for multiple columns, or does it?
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
Xi7
Newbie
*
Offline Offline

Posts: 5


« Reply #5 on: August 31, 2006, 12:55:16 PM »

Hi, I haven't tried this with multiple columns so I don't know. When I added the module to my side columns, the box styling (which works with <div><div><div><h3> was messed up and there was a large amount of space inside the box above and below the content.

I just thought I'd share the solution to these problems (which may be very specific to joomlashack templates, I dont know). Might save somebody using a similar template some time if they want to just pop in the module to a side column like a menu. If you think it will cause more problems for people than it will solve please feel free to remove the above code.

Steve
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 9002


« Reply #6 on: August 31, 2006, 01:20:13 PM »

I actually appreciate very much that you posted what worked for you here! Thanks. I just wanted to clarify that this solution will most likely not work if you want to use the columns feature.
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
Pages: [1]
« previous next »
    Jump to: