Want to add intro text to your category tables?

Moderator: mcsmom

Post Reply
User avatar
Waseem Sadiq
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
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 :)
Attachments
com_content_hack.zip
(22.16 KiB) Downloaded 51 times
Last edited by Anonymous on Thu Jan 26, 2006 3:56 pm, edited 1 time in total.
http://www.bulletprooftemplates.com/ - New Joomla 1.5 templates from an old Joomla head
http://s.imp.ly/joomla/ - If you don't know the answer don't be afraid to ask someone who does

User avatar
eyezberg
Joomla! Engineer
Joomla! Engineer
Posts: 263
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.blogspot.com for J! 1.5 screenshots
http://www.eyezberg.com

User avatar
Waseem Sadiq
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
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/ - New Joomla 1.5 templates from an old Joomla head
http://s.imp.ly/joomla/ - If you don't know the answer don't be afraid to ask someone who does

User avatar
guilliam
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 159
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.
^If u read that in $GREEN, you clearly missed the HIGHLIGHTS!
http://www.joomlancers.com | http://www.joomlaconsultancy.net

User avatar
Waseem Sadiq
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
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/ - New Joomla 1.5 templates from an old Joomla head
http://s.imp.ly/joomla/ - If you don't know the answer don't be afraid to ask someone who does

User avatar
guilliam
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 159
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.
^If u read that in $GREEN, you clearly missed the HIGHLIGHTS!
http://www.joomlancers.com | http://www.joomlaconsultancy.net

User avatar
guilliam
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 159
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.
^If u read that in $GREEN, you clearly missed the HIGHLIGHTS!
http://www.joomlancers.com | http://www.joomlaconsultancy.net

User avatar
Waseem Sadiq
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
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
Attachments
blog_style_category_hack.zip
(16.16 KiB) Downloaded 34 times
http://www.bulletprooftemplates.com/ - New Joomla 1.5 templates from an old Joomla head
http://s.imp.ly/joomla/ - If you don't know the answer don't be afraid to ask someone who does

User avatar
guilliam
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 159
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.
^If u read that in $GREEN, you clearly missed the HIGHLIGHTS!
http://www.joomlancers.com | http://www.joomlaconsultancy.net

D-one

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

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?


Post Reply