Want to add intro text to your category tables?

Forum closed, please submit your tips and tricks to: http://docs.joomla.org/Category:Tips_and_tricks
Forum rules
Please submit all new Tips and Tricks to: http://docs.joomla.org/Category:Tips_and_tricks

This forum section will be closed and removed eventually.
Locked
User avatar
Waseem Sadiq
Joomla! Ace
Joomla! Ace
Posts: 1441
Joined: Mon Sep 12, 2005 7:41 pm
Location: Glasgow - Scotland
Contact:

Want to add intro text to your category tables?

Post by Waseem Sadiq » Thu Jan 26, 2006 3:40 pm

Hi folks,

This little mini how-to is based on the solution from this post :http://forum.joomla.org/index.php/topic,12350.0.html

I've updated it a little to be relevant to Joomla 1.0.7.

This extended hack explains how to do the following:
  • Include Intro text in your category tables
  • Dynamically thumbnail the intro text image (using only CSS)
  • Style the intro text in the category table (I use this to make the text size a little smaller)
What you will need:
  • About 5 minutes to either copy and paste or type
  • A text editor
  • The files attached to this post ;)
Once you upload these files ***Timely reminder - BACK UP YOUR ORIGINAL FILES*** you will need to add a line to your language file (in my case its english.php)

After line 203

Code: Select all

DEFINE('_HEADER_TITLE','Item Title');
Add this:

Code: Select all

DEFINE('_HEADER_INTROTEXT','Item Description');
You also need to add a few lines to your CSS file for the dynamic image resize and text styling. in your template_css.css and this:

Code: Select all

.sectiontableentry2 img, .sectiontableentry1 img {
height: 18%; /*change this value to suit your site's layout*/
width: 18%; /*change this value to suit your site's layout*/
}

td.content_table_introtext {
font-size: .75em; /*change this value to suit your site's layout*/
}
A working example of this hack can be seen here: http://www.asghar.co.uk/content/category/4/17/51/

enjoy :)
You do not have the required permissions to view the files attached to this post.
Last edited by Anonymous on Thu Jan 26, 2006 3:56 pm, edited 1 time in total.
http://www.bulletprooftemplates.com/ - Joomla Templates and Consultancy

User avatar
eyezberg
Joomla! Hero
Joomla! Hero
Posts: 2860
Joined: Thu Aug 25, 2005 5:48 pm
Location: Geneva mostly
Contact:

Re: Want to add intro text to your category tables?

Post by eyezberg » Thu Jan 26, 2006 6:23 pm

Very nice site you linked there!
And this hack looks real good, think I'll use that ;)
Sometimes one pays most for the things one gets for nothing.
The important thing is not to stop questioning. Curiosity has its own reason for existing. AE
http://joomla15.[URL banned].com for J! 1.5 screenshots
http://www.eyezberg.com

User avatar
Waseem Sadiq
Joomla! Ace
Joomla! Ace
Posts: 1441
Joined: Mon Sep 12, 2005 7:41 pm
Location: Glasgow - Scotland
Contact:

Re: Want to add intro text to your category tables?

Post by Waseem Sadiq » Thu Jan 26, 2006 6:31 pm

Thanks Joe! :D

I've just noticed a little quirk in IE the images looked squashed at first (this is due to cahing). Also the images don't appear in Opera (haven't quite worked out Opera's quirks lol).

Otherwise, it works a treat
http://www.bulletprooftemplates.com/ - Joomla Templates and Consultancy

User avatar
guilliam
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4181
Joined: Thu Aug 18, 2005 10:27 am
Location: Sunny City Cebu, Philippines!
Contact:

Re: Want to add intro text to your category tables?

Post by guilliam » Sun Jan 29, 2006 12:44 am

thanks for sharing.. another winner! ;)

nice site for the reference too. however i think it would be beter if you have used virtuemart and use only the catalogue system?

beside that, it really looks nice!

btw, on your tfs for Joomla shows:

        56 % Commercial
19 % networks
10 % United Kingdom
10 % Unknown
5 % Netherlands
you may want to clear out your db removing com, net and unkown.. run this if ever:

Code: Select all

DELETE FROM `jos_TFS_ipaddresses` WHERE tld = '';
DELETE FROM `jos_TFS_ipaddresses` WHERE tld = 'net';
DELETE FROM `jos_TFS_ipaddresses` WHERE tld = 'com';

- guilliam
Last edited by guilliam on Sun Jan 29, 2006 12:49 am, edited 1 time in total.
"I was one of those who wondered why people would pay so much $$$$ to do something that was so much fun!" -R. Harkrider, Fortran Code Engr.

http://www.joomlaconsultancy.net

User avatar
Waseem Sadiq
Joomla! Ace
Joomla! Ace
Posts: 1441
Joined: Mon Sep 12, 2005 7:41 pm
Location: Glasgow - Scotland
Contact:

Re: Want to add intro text to your category tables?

Post by Waseem Sadiq » Sun Jan 29, 2006 3:31 pm

Thanks @ guilliam :)

Duly made the change to tfs ;)


I didn't really know about viruemart's catalogue set up to be honest but thanks for pointing it out. I'll be checking it out for future applications
http://www.bulletprooftemplates.com/ - Joomla Templates and Consultancy

User avatar
guilliam
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4181
Joined: Thu Aug 18, 2005 10:27 am
Location: Sunny City Cebu, Philippines!
Contact:

Re: Want to add intro text to your category tables?

Post by guilliam » Sun Jan 29, 2006 3:37 pm

warmly welcome..

looks better now without the "removing com, net and unkown" in the tfs :) nice to know it works on your db ;)

- g
"I was one of those who wondered why people would pay so much $$$$ to do something that was so much fun!" -R. Harkrider, Fortran Code Engr.

http://www.joomlaconsultancy.net

User avatar
guilliam
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4181
Joined: Thu Aug 18, 2005 10:27 am
Location: Sunny City Cebu, Philippines!
Contact:

Re: Want to add intro text to your category tables?

Post by guilliam » Tue Jan 31, 2006 3:45 pm

hi @haaris, any thoughts how to make the category look in quadrants or two items per row? not single item per row?

check the screenshot below:

Image

in which items will show 2 items per row compared to the current one like in your preview site that it only shows one item per row?

been playing with the files you attached.. however no cigar :(

- g
"I was one of those who wondered why people would pay so much $$$$ to do something that was so much fun!" -R. Harkrider, Fortran Code Engr.

http://www.joomlaconsultancy.net

User avatar
Waseem Sadiq
Joomla! Ace
Joomla! Ace
Posts: 1441
Joined: Mon Sep 12, 2005 7:41 pm
Location: Glasgow - Scotland
Contact:

Re: Want to add intro text to your category tables?

Post by Waseem Sadiq » Tue Jan 31, 2006 5:41 pm

Hi Guilliam,

It looks like what you are actually looking for here is a blog style display for categories. I'm not certain how to do that with the files in the thread (not being a coder n'all  :-[ ).

But you may want to take a look at this thread:
http://forum.joomla.org/index.php/topic,5895.0.html

It "nearly" does what you need but chucks out a few errors on J1.0.7. You being a far better coder than me, I'm sure you'll be able to figure out how to get it to work in J1.0.7 ;) (I've updated the j1.0.7 files to include this hack - it works but chucks out an error on the section page - they're attached to this post)

If you do would you mind posting here
You do not have the required permissions to view the files attached to this post.
http://www.bulletprooftemplates.com/ - Joomla Templates and Consultancy

User avatar
guilliam
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4181
Joined: Thu Aug 18, 2005 10:27 am
Location: Sunny City Cebu, Philippines!
Contact:

Re: Want to add intro text to your category tables?

Post by guilliam » Fri Feb 03, 2006 3:41 pm

hi haaris! thanks for the input.. however for time constraints.. i have decided to go with a non dynamic pulling of data(layout made in wyswyg editor). will post this site project im trying to implement this in the site showcase when its done. :)

again thank you. :)

- g 
"I was one of those who wondered why people would pay so much $$$$ to do something that was so much fun!" -R. Harkrider, Fortran Code Engr.

http://www.joomlaconsultancy.net

D-one
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Apr 26, 2006 3:45 pm

Re: Want to add intro text to your category tables?

Post by D-one » Mon May 08, 2006 1:25 pm

hi haaris, hi community!

I really like your hack!

Only two very important questions:
Is it possible to hide the intro text?
Or even better:
Is it possible to limit the intro text?

Not all my category-table-pages need the intro text.
Sometimes the intro text is too long.

Hope someone could help me

Thank you

D-one

Nhec
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Mon Aug 28, 2006 2:34 pm

Re: Want to add intro text to your category tables?

Post by Nhec » Mon Aug 28, 2006 2:36 pm

And which are the files to upload please?

simonjga
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Thu Oct 25, 2007 1:49 am

Re: Want to add intro text to your category tables?

Post by simonjga » Wed Apr 16, 2008 7:31 am

Hi All,

Love the hack, don't think I could have got the site as far as I have without it.

But I was wondering if anyone could help or provide advice for an issue I have now encountered?

When viewing a 'Table Content Category' and the images are placed into the 'intro text' everything is awesome.

But when I go into the actual article (content item) is there a way to hide the image in the intro text?

I had thought about giving the image in the intro text an id and then hiding it via css but the page has the same template as the table.

Any thoughts would be appreciated...

Cheers,

Simon

User avatar
Waseem Sadiq
Joomla! Ace
Joomla! Ace
Posts: 1441
Joined: Mon Sep 12, 2005 7:41 pm
Location: Glasgow - Scotland
Contact:

Re: Want to add intro text to your category tables?

Post by Waseem Sadiq » Wed Apr 16, 2008 3:30 pm

Hi Simon,

I suppose one way you could achieve the effect you're after is to hide the intro text completely when viewing the full article.

Just copy your intro text (minus the image) into the main article text area

Not CSS or anything fancy but it should give you the outcome you want :)

hope this helps,

Waseem
http://www.bulletprooftemplates.com/ - Joomla Templates and Consultancy

cchevy365
Joomla! Intern
Joomla! Intern
Posts: 57
Joined: Wed Aug 30, 2006 4:11 am

Re: Want to add intro text to your category tables?

Post by cchevy365 » Fri Jun 20, 2008 12:09 pm

Hello. I am running 1.0.15 website with several authors. Recently I experienced a difficulty in promoting them to publishers.

This is because the frontend lacks a "hide intro" option. I have some stories that are intro only, so enabling it in Global configuration is not an option(they will be hidden).

Is there a way I can add a custom code to the frontend and make this option possible for all the authors/publishers?

As it is, I have to publish all their stories and that is very time consuming for me at the moment.

User avatar
mcsmom
Joomla! Exemplar
Joomla! Exemplar
Posts: 7985
Joined: Thu Aug 18, 2005 8:43 pm
Location: New York
Contact:

Re: Want to add intro text to your category tables?

Post by mcsmom » Sat Jul 05, 2008 12:44 pm

cchevy,

lease post your question in the general forum or possibly the template forum..
So we must fix our vision not merely on the negative expulsion of war, but upon the positive affirmation of peace. MLK 1964.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.


Locked

Return to “Submit Your Suggested Tips & Tricks to Docs.joomla.org now please.”