1 (edited by khalido 2005-04-02 15:20)

Topic: Modifying extern.php

I am using extern.php to display active forum topics. The link extern.php generates includes "action=new":

http://www.domain.com/forums/viewtopic. … action=new

This link displays the bottom of the topic - I would like it to point to the first post instead of the new entry box right at the bottom. How do I modify extern.php so that it does not generate "action=new" in the url?

2

Re: Modifying extern.php

action=active

I do not really understand what you want to do...

Ludo,

Re: Modifying extern.php

I'm using this :
<?php
error_reporting( ~E_ALL);
include('http://ckkoshi.free.fr/punbb/extern.php?action=active&show=5');
?>
And work perfectly. (the php error reporting is because when it's slow there's an php error)

Sorry for my french english.
GT4 Club driver France & Forum - Lingerie.

4 (edited by khalido 2005-04-02 15:29)

Re: Modifying extern.php

The url extern.php shows is hard coded with "action=new". I am using /extern.php?action=active to display a list of active topics in my main website, and it is working just fine - the only issue is that the link goes to the bottom of that topic, and then people tend to post without reading the preceding replies.

Re: Modifying extern.php

line 255 extern.php

echo '<li><a href="'.$pun_config['o_base_url'].'/'.pun_link($pun_url['topic_new_posts'], $cur_topic['id']).'" title="'.pun_htmlspecialchars($cur_topic['subject']).'">'.$subject_truncated.'</a></li>'."\n";

Replace by

echo '<li><a href="'.$pun_config['o_base_url'].'/'.pun_link($pun_url['topic'], $cur_topic['id']).'" title="'.pun_htmlspecialchars($cur_topic['subject']).'">'.$subject_truncated.'</a></li>'."\n";

Sorry for my french english.
GT4 Club driver France & Forum - Lingerie.

Re: Modifying extern.php

Romuald: That's from 1.3 smile

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Modifying extern.php

Hurmf, there's no similar for 1.2.x ? smile

Sorry for my french english.
GT4 Club driver France & Forum - Lingerie.

Re: Modifying extern.php

Sure, just remove action=new from the link.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Modifying extern.php

Rickard wrote:

Sure, just remove action=new from the link.

How do I go about modifiying extern.php to do so? I looked at it, and couldn't make sense of it! If 1.3 is not too far away, (< 1 month) I could wait for that if it will be easier to modify.

Re: Modifying extern.php

Search for:

echo '<li><a href="'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].'&action=new" title="'.pun_htmlspecialchars($cur_topic['subject']).'">'.$subject_truncated.'</a></li>'."\n";

and replace it with

echo '<li><a href="'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].'" title="'.pun_htmlspecialchars($cur_topic['subject']).'">'.$subject_truncated.'</a></li>'."\n";
"Programming is like sex: one mistake and you have to support it for the rest of your life."

11 (edited by hubabuba 2005-05-05 16:11)

Re: Modifying extern.php

This is so cool.. smile

in both exemple its NOTHING about the 'Recent posts' !

only about others stuff.. of course..  wink  and everyone put on thier sites the "Recent posts"..  so maybe a link with what i should modify in extern.php to show the 'Recent posts' ?

Thank you smile


P.S. Maybe its time to update this page:
http://punbb.org/docs/dev.html#syndication
  ..and the instructions from extern.php
because its nothing about "recent posts"
big_smile

Re: Modifying extern.php

What are you talking about? Extern.php does output "recent posts".

"Programming is like sex: one mistake and you have to support it for the rest of your life."

13 (edited by hubabuba 2005-05-05 16:42)

Re: Modifying extern.php

i know its does..  but with some modification.. 

..and what is the command ? or where can i find that command ?

Re: Modifying extern.php

i mean how can i make to show the last post ? not from the begining of the topic.. 

thx smile

Re: Modifying extern.php

What command?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

16

Re: Modifying extern.php

I think he wants to know how to make extern.php work the same as "recent posts" on the PunBB.org front page (which of course is not using extern.php)

Re: Modifying extern.php

How does the "Recent posts" bit on the punbb.org front page differ from the output of extern.php?action=active ?

Edit: http://punbb.org/forums/extern.php?acti … mp;nfid=28 results in the exact same output as that on the front page.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

18

Re: Modifying extern.php

It doesn't differ but the instructions only talk about "recent topics" and "new topics". There is no mention of linking to the newest "post". I assumed he just wanted to know which instructions he had to follow to make it work like PunBB.org.

Re: Modifying extern.php

yes, thank you both smile

btw.. there is a way to integrate punbb in LDU800 ?