Automatical Graphical Text

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
argos
Posts: 135
Joined: Mon 15. Mar 2004, 20:02

Automatical Graphical Text

Post by argos »

Is it possible to have all Article Titles automatically subjected to the Graphical Text mod? I mean, to have graphical article titles I have to manually create things like {GT:Kop}Webdesign and Webhosting{/GT}. I would like to enter only the title "Webdesign and Webhosting" into the Article Title field, and then automatically the graphical version will be created.

I would like this mostly because the user who is going to create articles is no more than a user, not a computer literate person. I don't like the idea of him having to enter codes and tags.
Regards,
Jurgen Nijhuis
http://www.argosmedia.nl
explorit
Posts: 6
Joined: Fri 17. Sep 2004, 13:34

Post by explorit »

Hi there!
You've got to modify the article template (phpwcms_template->inc_cntpart->articlesummary->article->sample.tmpl) and put the replcemant tags {GT:... in there before and after the article titlereplacement tag {TITLE}. Now all your article titles are parsed with the grafical text mod...
argos
Posts: 135
Joined: Mon 15. Mar 2004, 20:02

Post by argos »

explorit wrote:Hi there!
You've got to modify the article template (phpwcms_template->inc_cntpart->articlesummary->article->sample.tmpl) and put the replcemant tags {GT:... in there before and after the article titlereplacement tag {TITLE}. Now all your article titles are parsed with the grafical text mod...
Hi!

Thanks for the suggestion, but it doesn't work. In fact you can delete te enture file from the server without any affect. It is called "sample" after all, so I guess it isn't needed in standard operation.

Any other suggestions?
Regards,
Jurgen Nijhuis
http://www.argosmedia.nl
sigaq
Posts: 8
Joined: Tue 21. Sep 2004, 08:47
Location: Salisbury, UK

Post by sigaq »

disregard - thought I had solved it but found a problem
argos
Posts: 135
Joined: Mon 15. Mar 2004, 20:02

Post by argos »

Eh... explorit had it right, it does work (technically). I forgot to choose the right article template in the article summary. However, there is still a problem. I cannot find the default article template. I have to find this to edit it, because the sample template is far different than the default one. Does anyone know in what file the default article is declared?
Regards,
Jurgen Nijhuis
http://www.argosmedia.nl
User avatar
Oliver Georgi
Site Admin
Posts: 9919
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

I would do it this way:

Code: Select all

$template_default["article"]["title_before"] = '<h1>{GT:H1}';
$template_default["article"]["title_after"]  = '{/GT}</h1>';
possible for every title.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
sigaq
Posts: 8
Joined: Tue 21. Sep 2004, 08:47
Location: Salisbury, UK

Post by sigaq »

that's what I thought - but some titles (links) are displayed as class "articleList_topsubhead" not GT, and changing this as well in conf.template_default.inc.php doesn't seem to help.

jp
argos
Posts: 135
Joined: Mon 15. Mar 2004, 20:02

Post by argos »

Oliver Georgi wrote:I would do it this way:

Code: Select all

$template_default["article"]["title_before"] = '<h1>{GT:H1}';
$template_default["article"]["title_after"]  = '{/GT}</h1>';
possible for every title.

Oliver
Very cool, it works!! Thanks Oliver!!!

Actually, I had to modify it slightly, because (on this site I am building, at least) there appeared a half page white between the title and subtitle somehow. When I removed the H1 bits from the code above, it worked like a charm. So what I use now is:

Code: Select all

$template_default["article"]["title_before"] = '{GT:Kop}'; 
$template_default["article"]["title_after"] = '{/GT}';
(where Kop is the name of the style I use).

So now every old and new article has by default the GT mod applied to the title, without me having to do it manually each time. Very nice!

This feature was rather important for me, because the site will be maintained by a ordinary computer user, without any html or other technical skills. I just have to make it as easy and foolproof for him as possible.
Regards,
Jurgen Nijhuis
http://www.argosmedia.nl
User avatar
Oliver Georgi
Site Admin
Posts: 9919
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

you should let <h1></h1> in it - if you have problems with margins do this in frontend.css:

Code: Select all

h1 { margin: 0; padding: 0;}
I recommend everybody not to use spacer images anymore like <br><img ="..."> and so on...

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
argos
Posts: 135
Joined: Mon 15. Mar 2004, 20:02

Post by argos »

Oliver Georgi wrote:you should let <h1></h1> in it - if you have problems with margins do this in frontend.css:

Code: Select all

h1 { margin: 0; padding: 0;}
I recommend everybody not to use spacer images anymore like <br><img ="..."> and so on...

Oliver
I did what you suggested, but then I have this white space again. Look:

Image

Do you know what causes this?
Regards,
Jurgen Nijhuis
http://www.argosmedia.nl
User avatar
Oliver Georgi
Site Admin
Posts: 9919
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

you should send html source of that part - then I might see the problem.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
argos
Posts: 135
Joined: Mon 15. Mar 2004, 20:02

Post by argos »

Oliver Georgi wrote:you should send html source of that part - then I might see the problem.

Oliver
Oops... I found the problem. It was just there in the css file all the time. It had a padding of "0px 0px 250px 0px" for ArticleHead, articleList_tophead, h1 and h2... I really don't know how it got there. The weird thing though is that it doesn't affect the normal header, but only when I switch to graphical. Anyway, it's fixed now :-)
Regards,
Jurgen Nijhuis
http://www.argosmedia.nl
Post Reply