Automatical Graphical Text
Automatical Graphical Text
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.
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.
Hi!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...
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?
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?
- Oliver Georgi
- Site Admin
- Posts: 9919
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
I would do it this way:
possible for every title.
Oliver
Code: Select all
$template_default["article"]["title_before"] = '<h1>{GT:H1}';
$template_default["article"]["title_after"] = '{/GT}</h1>';
Oliver
Very cool, it works!! Thanks Oliver!!!Oliver Georgi wrote:I would do it this way:
possible for every title.Code: Select all
$template_default["article"]["title_before"] = '<h1>{GT:H1}'; $template_default["article"]["title_after"] = '{/GT}</h1>';
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}';
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.
- Oliver Georgi
- Site Admin
- Posts: 9919
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
you should let <h1></h1> in it - if you have problems with margins do this in frontend.css:
I recommend everybody not to use spacer images anymore like <br><img ="..."> and so on...
Oliver
Code: Select all
h1 { margin: 0; padding: 0;}
Oliver
I did what you suggested, but then I have this white space again. Look:Oliver Georgi wrote:you should let <h1></h1> in it - if you have problems with margins do this in frontend.css:I recommend everybody not to use spacer images anymore like <br><img ="..."> and so on...Code: Select all
h1 { margin: 0; padding: 0;}
Oliver

Do you know what causes this?
- Oliver Georgi
- Site Admin
- Posts: 9919
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
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 nowOliver Georgi wrote:you should send html source of that part - then I might see the problem.
Oliver
