{TEASER_EX} Replacement tag v1.90 - 10.1.2007

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
Post Reply
erich_k4
Posts: 160
Joined: Thu 31. Mar 2005, 10:29
Location: Austria

Post by erich_k4 »

StudioZ wrote:Looking for a small and minor tweak....:wink:

I am trying to put the category name on it's own single line, rather than being immediately followed by the article title.
How could I edit this line? (~ 327):

$tmpl = render_cnt_template($tmpl, 'TITLE', html_specialchars($article_list[$key]["article_catname"]." - ".$article_list[$key]["article_title"]));

the " - " being the part where I need to replace with a break like "<br />" but it is not being taken :roll:

What I want to acheive is this:

Category Name Here
Article Title Here
Followed of course, by the summary
text Followed of course, by the summary
text Followed of course, by the
summary text ...


Regards,

Remove the html_specialchars function or split it ( #346 )
$tmpl = render_cnt_template($tmpl, 'TITLE', html_specialchars($article_list[$key]["article_catname"])." <br> ".html_specialchars($article_list[$key]["article_title"]));


Erich
User avatar
StudioZ
Posts: 802
Joined: Fri 28. May 2004, 19:57
Location: Québec, Canada
Contact:

Post by StudioZ »

erich_k4 wrote:Remove the html_specialchars function or split it ( #346 )
$tmpl = render_cnt_template($tmpl, 'TITLE', html_specialchars($article_list[$key]["article_catname"])." <br> ".html_specialchars($article_list[$key]["article_title"]));
Thank you Erich. That did the trick 8)
Now that I have the category name isolated on it's own line...
I am trying to find the necessary hack, to give it, it's own css style formatting. In fact I wish to make it small, just as a quick eye reference to which category it's been classified... No rush on this... :wink:
I sincerly beleive that this great RT ought to be integrated in the next release. It really opens up brand new possibilities. :D

Cheers,

Yves
Image
PhpWCMS Evangelist, -- iRoutier.com Running phpWCMS 1.4.2, r354 -> Great Version!!!!
cbmr777
Posts: 11
Joined: Thu 25. Aug 2005, 21:25
Location: U.S.
Contact:

Post by cbmr777 »

OK... I have finally gotten PHPWCMS 1.2.5DEV installed and working great!

I reinstalled the teaser tag but it is still not working. It shows up as text not article summaries. I have the tag in my HOME Template Main Section area.

I am an amateur at this so I know this is operator error :roll: but I can't figure out what I am doing wrong?

Here's my syntax:
{TEASER_EX:god|1;family|1;christine|1:default:0:More:2:}
The tag is placed in the front_render folder.

I am on a shared webserver hosting with:
Apache 1.3.33
PhP 4.3.10
Using MySql 4.0.25-std

Here's my webpage:
http://hoguechronicle.com/index.php

Thanks in advance!
Christine
kubens
Posts: 168
Joined: Sat 6. Nov 2004, 15:29
Location: Duesseldorf near Cologne ;-)

Post by kubens »

May you must enable RT support in your /config/phpwcms/conf.inc.php file :wink:
volkman
Posts: 179
Joined: Wed 13. Jul 2005, 12:52
Location: Hamburg, Germany

Post by volkman »

Christine, there used to be a bug in the sortorder-definition default.
Instead of "default" I used "article_tstamp|DESC" and got it working.

volkman
cbmr777
Posts: 11
Joined: Thu 25. Aug 2005, 21:25
Location: U.S.
Contact:

Post by cbmr777 »

In my conf.inc.php file it says:
// other stuff
$phpwcms["compress_page"] = 0; //0 = OFF, 1-9: page compression ON (1 = low level, 9 = highest level)
$phpwcms["imagick"] = 0; //0 = GD, 1 = ImageMagick, 2 = ImageMagick 4.2.9
$phpwcms["imagick_path"] = ""; //Path to ImageMagick (default="" - none)
$phpwcms["use_gd2"] = 1; //0 = GD1, 1 = GD2
$phpwcms["rewrite_url"] = 1; //whether URL should be rewritable
$phpwcms["wysiwyg_editor"] = 2; //0 = no wysiwyg editor, 1 = HTMLarea, 2 = FCKeditor, 3 = browser based
$phpwcms["phpmyadmin"] = 0; //enable/disable phpMyAdmin in Backend
$phpwcms["default_lang"] = "en"; //default language
$phpwcms["charset"] = "iso-8859-1"; //default charset 'iso-8859-1'
$phpwcms["allow_remote_URL"] = 1; //0 = no remote URL in {PHP:...} replacement tag allowed, 1 = allowed
$phpwcms["gt_mod"] = 1; //0 = Graphical Text MOD disabled, 1 = enabled
$phpwcms["jpg_quality"] = 75; //JPG Quality Range 25-100
$phpwcms["sharpen_level"] = 1; //Sharpen Level - only ImageMagick: 0, 1, 2, 3, 4, 5 -- 0 = no, 5 = extra sharp
$phpwcms["allow_ext_init"] = 1; //allow including of custom external scripts at frontend initialization
$phpwcms["allow_ext_render"] = 1; //allow including of custom external scripts at frontend rendering
$phpwcms["cache_timeout"] = 0; //default cache timeout setting in seconds - 0 = caching Off
$phpwcms["imgext_disabled"] = ''; //comma seperated list of imagetypes which should not be handled "pdf,ps"
$phpwcms["multimedia_ext"] = 'aif,aiff,mov,movie,mp3,mpeg,mpeg4,mpeg2,wav,swf,swc,ram,ra,wma,wmv,avi,au,midi,moov,rm,rpm,mid,midi'; //comma seperated list of file extensiosn allowed for multimedia
I changed the tag to say:

{TEASER_EX:god|1;family|1;christine|1:article_tstamp|DESC:0:More:2:}

Cleared my cache in the backend and in the browser, no change.
:cry:
Christine
1996 328ti
Posts: 317
Joined: Mon 19. Apr 2004, 06:10
Location: Greenville, SC USA
Contact:

word wrap?

Post by 1996 328ti »

I've said it before and I'll say it again. The teaser RT is great! It has transformed how I use phpwcms. The main function for my site are calendar of events. I had each event in two places. One under the type of event with detail and another in my calender of events which displayed on the home page category with redirects to the main article for that event. It was double work. Also I had sort by manual because I wanted them in date ending order.

Along comes teaser RT.
I now created the tag to look at several categories and sort them.
I only have to enter an event once. This will make it easier for me to give permission to others to add content.

And with using the contentpart alias, everything is coming into place.
I am eliminating the need for duplicate articles. Thank you, thank you, thank you.

But I do have one slight problem. ;)
If I choose 1 column I do not get any wordwrap.
The sentence go across the page until a return.
I have a need to use the RT but want one column.
Sounds like a simple fix. :)
volkman
Posts: 179
Joined: Wed 13. Jul 2005, 12:52
Location: Hamburg, Germany

Post by volkman »

@ Christine,
try to use the variables in the correct order or leave blank, I think thats the problem.

My RT looks like this one:

Code: Select all

{TEASER_EX:patient|1;arzt|1;forschung|1;service|1:5:article_tstamp|ASC:0::1}
try at your site:

Code: Select all

{TEASER_EX:god|1;family|1;christine|1:3:article_tstamp|DESC:0::1}


The number 3 lets you put three articles in that list (god, family, christine), is the var before sorting, has to be there. I have 4 teasers plus one from the page where they are displayed, thats why I have a 5 there.
I dont use "MORE" cause this is done by the summary-template, so I left it blank

Code: Select all

::
Start with 1 instead of 2 at number of columns.

If you dont want to exclude articles, leave it as it is at this point, no : at the end of the RT.

Hope thats gonna get this baby run

volkman
cbmr777
Posts: 11
Joined: Thu 25. Aug 2005, 21:25
Location: U.S.
Contact:

Post by cbmr777 »

I am not going to give up on this bad boy. I see how awesome it looks on others' websites... I'm going to get this running.

Implemented the suggested change to the tag and still see only text on home page.

My tag looks like this now:
{TEASER_EX:god|1;family|1;christine|1:3:article_tstamp|DESC:0::1}
If it helps, I did set up a test account if someone wants to poke around to see what I am doing wrong...
Christine
1996 328ti
Posts: 317
Joined: Mon 19. Apr 2004, 06:10
Location: Greenville, SC USA
Contact:

Post by 1996 328ti »

cbmr777 wrote:
{TEASER_EX:god|1;family|1;christine|1:3:article_tstamp|DESC:0::1}
Shouldn't that be?
{TEASER_EX:god|1[;family|1][;christine|1:3:article_tstamp|DESC:0::1}
1996 328ti
Posts: 317
Joined: Mon 19. Apr 2004, 06:10
Location: Greenville, SC USA
Contact:

Post by 1996 328ti »

Well I see you tried it both ways.
Whenever the teaser tag did not work for me it was always the wrong syntax.
You do say it works in some conditions?
God, family and christine are all aliases?
I don't recall anything needing to be enabled in the config file.
Are you entering the tag as html? Not sure if it matters.
cbmr777
Posts: 11
Joined: Thu 25. Aug 2005, 21:25
Location: U.S.
Contact:

Post by cbmr777 »

1996 328ti wrote:Well I see you tried it both ways.
Whenever the teaser tag did not work for me it was always the wrong syntax.
You do say it works in some conditions?
It hasn't worked yet. It just comes up as text. Very confusing. I have tried doing the syntax each way that pp's have come up with.
1996 328ti wrote:God, family and christine are all aliases?
yes, among others. They all have articles on those pages as well as articles in subcategories.
1996 328ti wrote:I don't recall anything needing to be enabled in the config file.
Are you entering the tag as html? Not sure if it matters.
I am entering the tag in my frontend HOME Template page. This particular template is only used by the HOME page.

I am putting it in the main portion of the template - looks like this:
[BR][BR]
{TEASER_EX:god|1;family|1;christine|1:3:article_tstamp|DESC:0::1}
[BR][BR]
Newest Articles Posted on The Hogue Chronicle:
[BR]
{NEW:5}
[BR]
On the home page the NEW tag is working but not the TEASER tag.

Edited to add that I went back to make sure all articles have summaries, etc. and are set to visible.
Christine
volkman
Posts: 179
Joined: Wed 13. Jul 2005, 12:52
Location: Hamburg, Germany

Post by volkman »

Hi Christine,
thats it, youve put it in the template!
Put it in a contentpart (plain text) of a page and it will work!!!
look here

Image

volkman
cbmr777
Posts: 11
Joined: Thu 25. Aug 2005, 21:25
Location: U.S.
Contact:

Post by cbmr777 »

You're gonna love this... still didn't work! :shock:

Here are my screenshots:
Image

Image

Image

Image

HTH!
Christine
volkman
Posts: 179
Joined: Wed 13. Jul 2005, 12:52
Location: Hamburg, Germany

Post by volkman »

i am not sure if this matters, but klicking on your site always givs me endings like /christine.phtml. Shouldnt this be like /index.php?christine.
Is rewirte on (.htaccess active)?

You are working on a mac like me, so opening a folder like the one you have in your screenshot always produces Files named .DS_Store. Delete them if your server is non-mac. Its mac-only information about filesystem and unixes are sometimes confused by files starting with ".".

volkman
Post Reply