Welcome to Geeklog, Anonymous Thursday, January 09 2025 @ 03:08 am EST
Geeklog Forums
What's Related block weirdness
oddly
Anonymous
I posted an article on a geeklog site and for some reason, almost the entire article appears as part of the "What's Related" block, so basically you see the real article in the middle and most of the article again in the what's related block. Any ideas on how to fix this behavior so it only shows the story's links?
the article posted (first 2 paragraphs in intro, the rest in the body)
10
9
Quote
oddly
Anonymous
Also, that site is running geeklog 1.3.9
7
9
Quote
Status: offline
asmaloney
Forum User
Full Member
Registered: 02/08/04
Posts: 214
Quote by oddly:Any ideas on how to fix this behavior so it only shows the story's links?
In lib-common.php in the function COM_extractLinks, try changing this:
Text Formatted Code
preg_match_all( "/(<a.*?href="(.*?)".*?>)(.*?)(</a>)/i", $fulltext, $matches );to this:
Text Formatted Code
preg_match_all( "/(<a +?href="(.*?)".*?>)(.*?)(</a>)/i", $fulltext, $matches );This will restrict it to matching only spaces between the 'a' and the 'href' which seems to be the problem.
12
7
Quote
oddly
Anonymous
Quote by Turias: Hmm, maybe it's a bug with 'a name'. Could you try removing that and seeing if it fixes it?
Yup. Removing the "a name" html tags fixed it immediately.
14
8
Quote
Status: offline
Turias
Forum User
Full Member
Registered: 10/20/03
Posts: 807
Yeah, asmaloney's hack will work, but it won't pick up links with attributes between the 'a' and the 'href' (like 'title', 'style', or 'class').
Looks like a bug with 'a' tags that don't hold a 'href' attribute. Wanna file a bug report?
Looks like a bug with 'a' tags that don't hold a 'href' attribute. Wanna file a bug report?
9
11
Quote
oddly
Anonymous
Thanks for the patch!! It fixed the problem completely.
7
8
Quote
oddly
Anonymous
http://project.geeklog.net/ responds with "The Geeklog Project Site Could Not Connect to Database:" when I try to go there to report this bug.
8
7
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by oddly: http://project.geeklog.net/ responds with "The Geeklog Project Site Could Not Connect to Database:" when I try to go there to report this bug.
Keep trying ... The project site is a bit unstable these days. That should be resolved soon, hopefully, when we finally move it to the new server.
bye, Dirk
10
11
Quote
All times are EST. The time is now 03:08 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