Don't show "More..." unless there really is more!

Use GitHub to post feature requests for phpwcms.
Locked
Ibis Fernandez
Posts: 67
Joined: Tue 22. Jun 2004, 19:54
Contact:

Don't show "More..." unless there really is more!

Post 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.
Ibis Fernandez
Cinestar Filmworks
http://flashfilmmaker.com
http://cinestarfilmworks.com
Author of Macromedia Flash Animation and Cartooning: A Creative Guide
Pappnase

Post 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
Ibis Fernandez
Posts: 67
Joined: Tue 22. Jun 2004, 19:54
Contact:

Post 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.
Ibis Fernandez
Cinestar Filmworks
http://flashfilmmaker.com
http://cinestarfilmworks.com
Author of Macromedia Flash Animation and Cartooning: A Creative Guide
spirelli
Posts: 996
Joined: Tue 27. Jul 2004, 13:37
Location: London

Post 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.
Last edited by spirelli on Thu 4. Nov 2004, 21:53, edited 1 time in total.
Pappnase

Post by Pappnase »

hello

i made it at the docu index page! only by creating 2 templates one with more one without. simple or? :wink:
spirelli
Posts: 996
Joined: Tue 27. Jul 2004, 13:37
Location: London

Post by spirelli »

Ahhhhh, clever!
Ibis Fernandez
Posts: 67
Joined: Tue 22. Jun 2004, 19:54
Contact:

Post 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.
Ibis Fernandez
Cinestar Filmworks
http://flashfilmmaker.com
http://cinestarfilmworks.com
Author of Macromedia Flash Animation and Cartooning: A Creative Guide
spirelli
Posts: 996
Joined: Tue 27. Jul 2004, 13:37
Location: London

Post by spirelli »

You hit the nail on the head, Ibis Fernandez. :D
Last edited by spirelli on Thu 4. Nov 2004, 21:53, edited 1 time in total.
User avatar
wireless
Posts: 138
Joined: Sun 24. Oct 2004, 04:35
Location: Houston, Texas

Post by wireless »

So,
has the answer been found as to how to only show "read more" if there really is more to read?
Ibis Fernandez
Posts: 67
Joined: Tue 22. Jun 2004, 19:54
Contact:

Post by Ibis Fernandez »

nope. :(
Ibis Fernandez
Cinestar Filmworks
http://flashfilmmaker.com
http://cinestarfilmworks.com
Author of Macromedia Flash Animation and Cartooning: A Creative Guide
benswift
Posts: 6
Joined: Thu 6. Jan 2005, 05:18

Post 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?
*ben
spirelli
Posts: 996
Joined: Tue 27. Jul 2004, 13:37
Location: London

Post 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.
benswift
Posts: 6
Joined: Thu 6. Jan 2005, 05:18

Post 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
*ben
spirelli
Posts: 996
Joined: Tue 27. Jul 2004, 13:37
Location: London

Post by spirelli »

Locked