Welcome to Geeklog Monday, December 06 2021 @ 01:23 am EST

Geeklog Forums

Stories By Topic Block

Page navigation


Status: Banned

machinari

Forum User
Full Member
Registered: 22/03/04
Posts: 1512
point me to the script and i'll see about it for you...
 Quote

noob

Anonymous
http://www.geeklog.net/filemgmt/singlefile.php?lid=564

good luck! can't wait. very excited!!
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 22/03/04
Posts: 1512
here ya go... I inserted the option to enable or disable the intro as well as the ability to limit the intro to a number of characters (an extra if/else would do if you want to disable the char count altogether).

HTH, untested

edit... posted the code but stripped some stuff so i'll give a link, hang on

edit... modified file here. Let me know if it doesn't do what you want.
 Quote

noob

Anonymous
First - well done on the double-quick work.

Second - I'm trying hard here - i've got to the point where i have the titles then a space (

in the code), so something's trying to get through but it's just not making it.

i'm going to stare at this puppy for a while and see if i can see anything - any help above and beynd what yo've already done would be great.

thanks
 Quote

noob

Anonymous
Crikey! Also, when i change the headline length to something ridiculous it doesn't reflect in the page. i've refreshed and refreshed but none of my changes take place. maybe i'm just doing something totally and utterly wrong....

d'oh!
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 22/03/04
Posts: 1512
start with this... neglected to put var 5 and 6 into the first call to displaystories() at about line 818 make it look like this:
PHP Formatted Code
            $display .= displayStories($merge_title, $sql, $merge_topics, $max_title_length, $intro, $max_intro_length);

 
now i'll test it and see if it works
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 22/03/04
Posts: 1512
k, I did it and it works now... sorry, but that's what happens when I'm playing CS at the same time as coding on another monitor Leaves me speechless
couple minutes and I'll put up the tarball.
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 22/03/04
Posts: 1512

noob

Anonymous
hmmm, i don't know. i've tried the new script and messed about a bit myself but still can't get it to work properly. i still have

where the intro should be.
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 22/03/04
Posts: 1512
my cache issue, sorry..
try now
 Quote

noob

Anonymous
Whoah! You did it! Big Celebration Big Celebration Big Celebration

I just downloaded it, installed it and it worked first time. Like a dream.

Thanks for all your help. This block is now complete. I suggest everyone replaces their old block with this new, improved version.

Well done.
 Quote

Status: offline

geKow

Forum User
Full Member
Registered: 12/01/03
Posts: 445
There is one thing about this block, that I think is a kind of bug (talking abou the initial version) it also lists articles with the draft flag set (i hope that's how it's called in English Embarassed )

geKow
 Quote

Status: offline

beewee

Forum User
Full Member
Registered: 05/08/03
Posts: 969
Location:The Netherlands, where else?
A simple way of improving the search engine optimization if you use the URL rewrite function, change this:
PHP Formatted Code
$display .= '<a href="' . $_CONF['site_url'] . '/article.php?story=' . $sid . '">' . $story_title . '</a><br>';
 

in:
PHP Formatted Code
$display .= '<a href="' . $_CONF['site_url'] . '/article.php/' . $sid . '">' . $story_title . '</a><br>';
 

Dutch Geeklog sites about camping/hiking: www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
 Quote

Status: offline

drshakagee

Forum User
Full Member
Registered: 01/10/03
Posts: 231
A more universal approach would be to use the COM_buildURL function to create the proper rewritten url, that way it works for people who have rewriting turned off as well:
PHP Formatted Code

$properurl = COM_buildURL($_CONF['site_url'] . '/article.php?story=' . $sid);
$display .= '<a href="' . $properurl . '">' . $story_title . '</a><br>';

 

I didn't really test it but I believe that should work fine.
Yes I am mental.
 Quote

Page navigation

All times are EST. The time is now 01:23 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