Posted on: 05/04/05 09:04am
By: beewee
I just love this block, it's really great. But since we're all using GL1.3.10 and 1.3.11 we can change the story ID. I found out that the Stories By Topic Block now lists the wrong stories since they are sorted by story ID instead of submission date. The result is that a story with ID=zzzzzzzzz submitted ages ago will be listed as a new story while a brand new story with ID=aaaaaaaa is not listed as a new story.
How can I change that?
Stories By Topic Block
Posted on: 05/27/05 05:46am
By: beewee
Well, I'm no developer but I succeeded in changing the sorting from 'sid' to 'date'. I've uploaded the file to GL.
BTW this should be a default GL block IMHO
Stories By Topic Block
Posted on: 05/27/05 06:32am
By: geKow
I can't download your file SQL error.
geKow
Stories By Topic Block
Posted on: 05/27/05 07:04am
By: beewee
I don't think it's already through the submission que
Stories By Topic Block
Posted on: 05/27/05 07:33am
By: geKow
ah, I see...
so I would guess, that it's a kind of bug that I can find the file using the search
geKow
Stories By Topic Block
Posted on: 05/27/05 07:38am
By: beewee
Yes, I think it's a bug. This is the second time I noticed it so I'll report it. If you're in a hurry I can mail the file if you like.
Stories By Topic Block
Posted on: 05/27/05 07:56am
By: geKow
oh, I'm not in a hurry. ... but on the other hand...
Stories By Topic Block
Posted on: 05/27/05 08:35am
By: geKow
Thanks a lot
But I have a problem, maybe I missed something?
All the links to the stories appear without $sid
like this
http://gekow.net/article.php?story=
geKow
Stories By Topic Block
Posted on: 05/27/05 09:08am
By: beewee
Oooops, , I overlooked something while copying it from my own lib-custom.php:
Around line 151 change this:
// pull only the stories the visitor is allowed to view
$sql = "SELECT title, date FROM {$_TABLES['stories']} WHERE ";
to
// pull only the stories the visitor is allowed to view
$sql = "SELECT title, sid FROM {$_TABLES['stories']} WHERE ";
So change 'date' to sid'
Sorry for the mistake, I'll upload a new version right away if this change helps...
Stories By Topic Block
Posted on: 05/27/05 10:19am
By: geKow
it IS allready written the way you said. It says sid at this point, so I guess it is something else?
Could it be sometihing on my side?
geKow
---------
oh wait... I didn't check my mail brb
Stories By Topic Block
Posted on: 05/27/05 10:25am
By: geKow
ok, everything looks fine, now. Thanks again and greetings to NL, my dear neighbour.
Stories By Topic Block
Posted on: 05/27/05 10:57am
By: drshakagee
Just curious but what does this block do that you can't do with content syndication and a portal block?
Stories By Topic Block
Posted on: 05/27/05 11:09am
By: geKow
Hey, I understand your question
the difference I see is, that you can have a limited number of topics from different categories (!) merged to one list or separated by categories.
I have made an experimental install here at
my sitere[*1] , you can see the block under " die letzten 3" where "gekow.news" shows the last couple of entries from all categories using a portal block.
(sorry, german )
geKow
Stories By Topic Block
Posted on: 05/27/05 02:36pm
By: drshakagee
I gotcha, nice stuff! I just downloaded it to play with. Thanks for the efforts.
Stories By Topic Block
Posted on: 06/15/05 10:44am
By: clunk
Is there any chance of this block being able to also display the intro text for each story headline as well as just the headline?
Stories By Topic Block
Posted on: 06/15/05 10:53am
By: beewee
This should be possible, but I don't know how . I'm no developer, so updating the block was already quite something for me.
Stories By Topic Block
Posted on: 06/15/05 06:43pm
By: clunk
Does anybody know how? I'm just staring.
Stories By Topic Block
Posted on: 06/20/05 06:33pm
By: Anonymous (noob)
I too would like to have some or all of the intro listed with the headline. did anyone come up with a way t do this?
Stories By Topic Block
Posted on: 06/21/05 11:02am
By: beewee
Did you try to change the PHP file yourself? Shouldn't be that hard..
Stories By Topic Block
Posted on: 06/21/05 11:35am
By: Anonymous (noob)
wish i could. don't know anything about editing scripts. have to rely on other people's generosity.
Stories By Topic Block
Posted on: 06/21/05 12:08pm
By: machinari
point me to the script and i'll see about it for you...
Stories By Topic Block
Posted on: 06/22/05 07:10am
By: Anonymous (noob)
Stories By Topic Block
Posted on: 06/22/05 01:15pm
By: machinari
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.
Stories By Topic Block
Posted on: 06/22/05 07:23pm
By: Anonymous (noob)
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
Stories By Topic Block
Posted on: 06/22/05 07:57pm
By: Anonymous (noob)
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!
Stories By Topic Block
Posted on: 06/22/05 08:05pm
By: machinari
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:
$display .= displayStories($merge_title, $sql, $merge_topics, $max_title_length, $intro, $max_intro_length);
now i'll test it and see if it works
Stories By Topic Block
Posted on: 06/22/05 08:24pm
By: machinari
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
couple minutes and I'll put up the tarball.
Stories By Topic Block
Posted on: 06/22/05 08:31pm
By: machinari
Stories By Topic Block
Posted on: 06/23/05 05:32am
By: Anonymous (noob)
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.
Stories By Topic Block
Posted on: 06/23/05 01:04pm
By: machinari
my cache issue, sorry..
try now
Stories By Topic Block
Posted on: 06/23/05 06:13pm
By: Anonymous (noob)
Whoah! You did it!
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.
Stories By Topic Block
Posted on: 07/08/05 02:46pm
By: geKow
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 )
geKow
Stories By Topic Block
Posted on: 08/12/05 04:53am
By: beewee
A simple way of improving the search engine optimization if you use the URL rewrite function, change this:
$display .= '<a href="' . $_CONF['site_url'] . '/article.php?story=' . $sid . '">' . $story_title . '</a><br>';
in:
$display .= '<a href="' . $_CONF['site_url'] . '/article.php/' . $sid . '">' . $story_title . '</a><br>';
Stories By Topic Block
Posted on: 08/12/05 12:21pm
By: drshakagee
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:
$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.