Page 1 of 1

Want to add intro text to your category tables?

Posted: Thu Jan 26, 2006 3:40 pm
by Waseem Sadiq
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 :)

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

Posted: Thu Jan 26, 2006 6:23 pm
by eyezberg
Very nice site you linked there!
And this hack looks real good, think I'll use that ;)

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

Posted: Thu Jan 26, 2006 6:31 pm
by Waseem Sadiq
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

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

Posted: Sun Jan 29, 2006 12:44 am
by guilliam
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

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

Posted: Sun Jan 29, 2006 3:31 pm
by Waseem Sadiq
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

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

Posted: Sun Jan 29, 2006 3:37 pm
by guilliam
warmly welcome..

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

- g

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

Posted: Tue Jan 31, 2006 3:45 pm
by guilliam
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

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

Posted: Tue Jan 31, 2006 5:41 pm
by Waseem Sadiq
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

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

Posted: Fri Feb 03, 2006 3:41 pm
by guilliam
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 

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

Posted: Mon May 08, 2006 1:25 pm
by D-one
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

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

Posted: Mon Aug 28, 2006 2:36 pm
by Nhec
And which are the files to upload please?

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

Posted: Wed Apr 16, 2008 7:31 am
by simonjga
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

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

Posted: Wed Apr 16, 2008 3:30 pm
by Waseem Sadiq
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

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

Posted: Fri Jun 20, 2008 12:09 pm
by cchevy365
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.

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

Posted: Sat Jul 05, 2008 12:44 pm
by mcsmom
cchevy,

lease post your question in the general forum or possibly the template forum..