Page 1 of 1
Don't show "More..." unless there really is more!
Posted: Sun 29. Aug 2004, 17:31
by Ibis Fernandez
There this thing I find anoying. It is the little link that appears at the end of the summary that says "more...". If you click it it takes to to the full article...
Of course, often times there isn't any more content so if the user click he doesnt really get anywhere with it.
My question is how can this be modified so that it only appears if there really is more contentent parts to that entry.
Posted: Sun 29. Aug 2004, 19:48
by Pappnase
hello
you can edit your tmpl file. for summarys.
so you can choose what you want to display and what not.
you will find it here.
/phpwcms_template/inc_cntpart/articlesummary
Posted: Sun 29. Aug 2004, 20:17
by Ibis Fernandez
I understand that.
However my question is in making it only display the "more..." link... only if there really is more...
I know very little about php & mysql but I do know quite a bit about flash and actionscript...so I do know that what Im asking about here is some kind of "if" conditional that will check and see if there are additional parts to the article.
If there is then it should display the link.
If there is not then the link should not display.
What I'm working on is creating a
Encyclopedia of animation & filmmaking. Each entry fits within the sumarry part alone so there really is no need to click for more. However, some entries will in fact have mutiple parts and when those are sumarised only those should provide the link to the full article.
Posted: Thu 14. Oct 2004, 01:00
by spirelli
I think this feature is definately needed. I need it At the moment. Has anyone worked out how to do it, to hide the 'more' link if the article has no content parts?
Thanks.
Posted: Thu 14. Oct 2004, 01:03
by Pappnase
hello
i made it at the docu index page! only by creating 2 templates one with more one without. simple or?
Posted: Thu 14. Oct 2004, 04:14
by spirelli
Ahhhhh, clever!
Posted: Thu 14. Oct 2004, 05:01
by Ibis Fernandez
Thats not a viable solution. It only creates another unnessesary file, and an unneeded step.
Simple? Yes.
Smart? No.
What we need is a way for PHP to automatically evaluate this for you regardless of the template used.
In actionscript this type of code looks like this:
if (more == true){
//Code to display the more link would go here.
} else {
// Blank or null.
}
Unfortunatelly i have no idea how to do this sort of thing in PHP.
Posted: Thu 14. Oct 2004, 22:23
by spirelli
You hit the nail on the head, Ibis Fernandez.
Posted: Tue 2. Nov 2004, 14:34
by wireless
So,
has the answer been found as to how to only show "read more" if there really is more to read?
Posted: Tue 2. Nov 2004, 15:18
by Ibis Fernandez
nope.
Posted: Thu 6. Jan 2005, 05:39
by benswift
would there be any reason the article list template would be stuck on "default" ?
I have set it to "sample.tmpl" and a custom "list.tmpl" and neither have done a thing-
my site is here:
http://www.wsphardcore.com/index.php
the article summary list is the yellow box on the right which is in an iframe.
the custom template I made "list.tmpl" is like this :
Code: Select all
<hr>
<div>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td width="98%" valign="top">
[b]{DATE_ARTICLE}[/b][br]
{SUMMARY}[br]
{AUTHOR}
</td>
</tr>
</table>
</div>
I intend to completely remove the "more..." link.
before you ask: yes I have set the article summaries to point to "list.tmpl"
yes I have gotten custom templates to work on a different install...
any clues?
- also - I have noticed that the DATE_ARTICLE tag will work in an article summary but the AUTHOR tag does not?
Posted: Mon 10. Jan 2005, 16:10
by spirelli
no idea what's wrong at your end, if you set the "article listing:" in the article information area to list.tmpl. Maybe you try posting your problem in the support area again.
I hope that future versions of phpwcms will be completely without the hard coded 'default' template but have only whatever is in the /phpwcms_template/inc_cntpart/articlesummary folder.
Posted: Tue 11. Jan 2005, 02:28
by benswift
thanks spirelli- I'll repost over in support- my server was getting hacked so I couldn't do any more testing... until now
also- I rest my php.ini- so maybe that will help
Posted: Tue 1. Mar 2005, 00:26
by spirelli