Welcome to Geeklog, Anonymous Monday, December 23 2024 @ 03:42 am EST

Geeklog Forums

problems witht he read more link


Status: offline

orfilms

Forum User
Regular Poster
Registered: 08/02/05
Posts: 70
My read more link appears on every article even when there isn't more (saying there's one word). I've checked my databases and there isn't any spaces in the bodytext. I've checked my template and it has the proper {readmore_link}. Anyone have any ideas?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
There must be something in the bodytext - otherwise that link wouldn't show up.

Are using the CVS version? Or some WYSIWYG editor (HTMLarea, FCKeditor, ...)?

bye, Dirk
 Quote

Status: offline

orfilms

Forum User
Regular Poster
Registered: 08/02/05
Posts: 70
I'm using xinha-nightly. The databases dont show anything in the body text. Is there any way to make it so that it must be more than two words to add the read more link?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The proper solution, of course, would be to make it so that the body text is really empty.

We have the same problem when using FCKeditor (in the CVS version), which has been filed as a bug. I would assume that the fix for this would also work for you then.

bye, Dirk
 Quote

Status: offline

orfilms

Forum User
Regular Poster
Registered: 08/02/05
Posts: 70
I just launched a new site yesterday and we had 5,776 unique visitors resulting in 26,316 page views.

I need a makeshift sollution. Is there anyone who could help me with a hack that would only display the read more link if there were more than three words in the body text?

 Quote

Status: offline

DTrumbower

Forum User
Moderator
Registered: 01/08/03
Posts: 507
In the case of FCKeditor, it puts <br> in the body text.

I suppose you could modify admin/story.php and check the bodytext for only a <br> and make it empty instead. Maybe in the submitstory function.
 Quote

Status: offline

DTrumbower

Forum User
Moderator
Registered: 01/08/03
Posts: 507
What browser are you using? I get the same outcome when using Firefox, but IE doesn't insert a break.
 Quote

Status: offline

orfilms

Forum User
Regular Poster
Registered: 08/02/05
Posts: 70
Andy fixed the problem with this little hack:

changing line 211 of system/lib-story.php from this:

if( !empty( $A['bodytext'] ))

to this:

if( strlen( $A['bodytext'] ) > 2 )

It only appears to work for non featured stories, but thats good enough for my use
 Quote

Status: offline

asmaloney

Forum User
Full Member
Registered: 02/08/04
Posts: 214

Don't really know why I picked a string length of 2, although, in my defence, I was drunk at the time.

Don't drink and code.

Shocked

- Andy
 Quote

All times are EST. The time is now 03:42 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content