The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.



Post new topic Reply to topic  [ 21 posts ] 
Author Message
PostPosted: Mon Jan 07, 2008 10:51 am 
Joomla! Intern
Joomla! Intern

Joined: Tue Nov 06, 2007 7:46 pm
Posts: 51
I've added some code to my category blog template override that runs the content plugins on the category description. Just thought I'd share:

File: /template/[mytemplate]/html/com_content/category/blog.php page...

Code:
   // Hack to run content modules on cat description
   $article =& new JObject();
   $article->text = $this->category->description;
   $dispatcher      =& JDispatcher::getInstance();
   
   JPluginHelper::importPlugin( 'content' );
   $results = $dispatcher->trigger('onPrepareContent', array (& $article, array(), 0));
   
   $this->category->description=  $article->text;


Hope this helps someone...

_________________
http://www.RegallyGraceful.com
Spiritual Perspective, Practical Outlook, Professional Experience


Top
 Profile  
 
PostPosted: Mon Jan 07, 2008 11:32 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17238
Location: **Translation Matters**
Moving to 1.5 Template overrides.
Thanks for the tip.  :)

Topic made sticky.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Last edited by infograf768 on Mon Jan 07, 2008 11:42 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sat Feb 16, 2008 5:54 pm 
Joomla! Hero
Joomla! Hero

Joined: Sun Jun 25, 2006 12:12 am
Posts: 2855
Location: Salisbury, NC/USA (N. of Charlotte)
What is the specific result/display this modification creates? Can you provide a link or screen shot example?

_________________
http://www.200mphMedia.net
Author: Joomla 1.6 Picture Yourself Series book @ Amazon.com
Book also covers Version 1.7, 2.5, which had no notable/major user-side changes.


Top
 Profile  
 
PostPosted: Sun Feb 17, 2008 9:53 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17238
Location: **Translation Matters**
I guess it could provide for e-mail cloaking for example in a description.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Sun Feb 17, 2008 11:05 am 
Joomla! Intern
Joomla! Intern

Joined: Tue Nov 06, 2007 7:46 pm
Posts: 51
Exactly or geisha or {loadmodule user1}. Normally content plugins only run on the article text and not on the category and section description. This override runs them on an arbitrary piece of text (section description in the case of the example above)


Top
 Profile  
 
PostPosted: Sun Feb 17, 2008 5:22 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17238
Location: **Translation Matters**
@harikaram

If you could find a way —without hacking core— to be able to use Content plugins in HTML Modules (the former Custom Modules in 1.0.x), this would be a real help for a lot of users as this is impossible as of now.
Many people use this in 1.0.x and migrating is a nightmare for them.
There would be a performance hit, but it is worth it IMO.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Fri Feb 22, 2008 9:26 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Feb 11, 2008 7:32 am
Posts: 2
Jean-Marie, maybe you passed up my recent post: http://forum.joomla.org/viewtopic.php?f=469&t=264545
You'll find the solution you are looking for there.


Top
 Profile  
 
PostPosted: Fri Feb 22, 2008 12:29 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17238
Location: **Translation Matters**
GREAT indeed. ;)
Ian has also released since a Custom Content module overpassing the limitation of the HTML module.
This can replace easily the custom module by loading an Article. And as we all know, articles do accept content-plugins...

See:
http://extensions.joomla.org/component/ ... Itemid,35/

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Tue Jun 24, 2008 3:54 pm 
Joomla! Intern
Joomla! Intern

Joined: Tue Nov 06, 2007 7:46 pm
Posts: 51
infograf768. funny you mention this. I just found this post again searching joomla site for a solution to this issue. Along the way I found a forum post from back at J1.0.0 about people complaining that J1.0.? turned ON content plugins for modules. The developers claimed that it was just sensible that it should be this way so ironic that it has been reverted. Perhaps a module option would be nice??

The custom module plugin is great. Thank you very much, fedefil.

_________________
http://www.RegallyGraceful.com
Spiritual Perspective, Practical Outlook, Professional Experience


Top
 Profile  
 
PostPosted: Mon Jul 21, 2008 10:47 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Mar 06, 2008 12:22 am
Posts: 15
Thank you for this post! I have been scouring the web trying to find a way to allow the same function in the com_contact category description. I should have looked here first! This hack works beautifully! No changes were necessary.

In case you might be asking, "why would I need to do this?" My usage will be to incorporate the Contact Information Module 2.2 from http://www.digitalgreys.com/ to allow me to show a location address (and image) in the header of my contacts list of a specified category. Basically, I wanted to be able to show the location information and not have to add it to every contact record of that location.

Thanks again! Works like a charm! :laugh:


Top
 Profile  
 
PostPosted: Mon Jun 01, 2009 1:26 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Apr 14, 2009 8:16 am
Posts: 27
Location: Makassar, Indonesia
Useful topic, dude...

Status subscribe... :D :D


Top
 Profile  
 
PostPosted: Wed Jun 17, 2009 8:37 pm 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Tue Oct 28, 2008 7:19 pm
Posts: 51
Yes, still useful!
I think so too. Great! Thanks to all for sharing ....

_________________
http://www.digidog.de | graphics art work, design, post production, motion pictures, web scenarios, cms and framework implementation


Top
 Profile  
 
PostPosted: Fri Sep 04, 2009 5:43 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Aug 28, 2009 6:07 pm
Posts: 5
pls who understand what this mean. This is what the page display each time I click on ijoomla news icon inside my components on adminstrator control panel

Site error: the file /home/content/a/f/r/africannewsliv/html/administrator/components/com_news_portal/admin.news_portal.php requires the ionCube PHP Loader ioncube_loader_lin_5.2.so to be installed by the site administrator.


Top
 Profile  
 
PostPosted: Sat Sep 05, 2009 3:14 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17238
Location: **Translation Matters**
Journalforum wrote:
pls who understand what this mean. This is what the page display each time I click on ijoomla news icon inside my components on adminstrator control panel

Site error: the file /home/content/a/f/r/africannewsliv/html/administrator/components/com_news_portal/admin.news_portal.php requires the ionCube PHP Loader ioncube_loader_lin_5.2.so to be installed by the site administrator.

This has nothing to do with the original topic.

You are using an encrypted component called com_news_portal which requires a specific php script called Ioncube to run. You better talk with whoever sold you this component.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Sun Mar 07, 2010 3:29 pm 
Joomla! Intern
Joomla! Intern

Joined: Wed Feb 24, 2010 2:14 am
Posts: 56
It was very usefull. Thanks for sharing.


Top
 Profile  
 
PostPosted: Tue Apr 06, 2010 3:46 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Mar 23, 2010 3:51 am
Posts: 21
Location: Dallas, TX
Thanks for the post. We'll be using this soon.

_________________
Hassan Bawab is the CEO of Magic Logix, a digital marketing agency. Magic Logix combines dynamic website development, professional website design, SEO & integrated social media marketing to [drive] new leads with high conversion.


Top
 Profile  
 
PostPosted: Sun Jul 11, 2010 6:57 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jun 11, 2010 9:32 pm
Posts: 6
perfect, exactly what I was looking for. However - I am not sure where to exactly place this? Can someone please give me a hint? doesn't work by placing at the beginning ...

Thanks

Peter


Top
 Profile  
 
PostPosted: Thu Sep 02, 2010 8:56 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Aug 23, 2010 7:42 am
Posts: 17
petergadget wrote:
perfect, exactly what I was looking for. However - I am not sure where to exactly place this? Can someone please give me a hint? doesn't work by placing at the beginning ...

Thanks

Peter


Depend on what template you are using, Some template may need to create your folder in your template file first: html/com_content/category/blog.php

_________________
Joomla 1.6 templates: http://www.99template.com/main/joomla_16_templates.html
Template guide: http://www.99template.com/template


Top
 Profile  
 
PostPosted: Sun Oct 31, 2010 7:20 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri May 28, 2010 4:10 pm
Posts: 15
componenets such as sh404sef for seo caused any problem ? because it change link automatically to html as you know . when the way changed maybe has problem in future articles . such as when we post something , and need to change topic again , it not change link , because it just optimize it in article id

_________________
Please read forum rules regarding signatures: viewtopic.php?t=65


Top
 Profile  
 
PostPosted: Fri Dec 31, 2010 12:21 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Dec 29, 2010 4:26 pm
Posts: 2
harikaram wrote:
I've added some code to my category blog template override that runs the content plugins on the category description. Just thought I'd share:

File: /template/[mytemplate]/html/com_content/category/blog.php page...

Code:
   // Hack to run content modules on cat description
   $article =& new JObject();
   $article->text = $this->category->description;
   $dispatcher      =& JDispatcher::getInstance();
   
   JPluginHelper::importPlugin( 'content' );
   $results = $dispatcher->trigger('onPrepareContent', array (& $article, array(), 0));
   
   $this->category->description=  $article->text;


Hope this helps someone...


Top
 Profile  
 
PostPosted: Fri Jun 03, 2011 12:46 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Jun 03, 2011 12:22 pm
Posts: 4
Guys pls help me out on this topic. I get this when installing templates.

"Error! Could not find an XML setup file in the package" via the link below

viewtopic.php?f=469&t=625543


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ] 



Who is online

Users browsing this forum: Google Adsense [Bot] and 30 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® Forum Software © phpBB Group