1 (edited by StevenBullen 2010-04-07 12:25)

Topic: [Extension release] Last post subject on index

Ok just a play about. Works for me though... smile

Here is the download for people who cant be bothered to copy and paste.

EDIT: Have changed isset to !empty as advised.
EDIT (1.2): A few updates... Still going to do a couple of changes for release. smile
EDIT (1.3): A few updates... If you used 1.2, you must replace it with this one.
EDIT (1.3): Mini update...
EDIT (1.4): Couple of big changes...
EDIT (1.5): Hopefully the last...

EDIT:
Please go to http://punbb.informer.com/forums/topic/ … -on-index/ for latest version of this extension.

Re: [Extension release] Last post subject on index

The directory name has to be: subject_index and not recent_index. wink

Re: [Extension release] Last post subject on index

Changed it now. Cheers bingiman.

Re: [Extension release] Last post subject on index

(isset($idmComp)) is redundant because the if/else statement ensures the definition of $idmComp.

Re: [Extension release] Last post subject on index

It should actually be !empty rather than isset.

Re: [Extension release] Last post subject on index

Cheers smartys.

With these extensions there is still large room for confliction. Dont you think?

Re: [Extension release] Last post subject on index

You mean in terms of variables?
http://punbb.org/forums/viewtopic.php?p … 28#p108528

8 (edited by StevenBullen 2008-02-06 15:17)

Re: [Extension release] Last post subject on index

Erm... Nah.

I meant as in the above extension adds a left join for the topics as t. So now if someone creates another extension and trys the same thing there will be a problem?

That kind of confliction. It might not happen on this query but what about other queries. hmm

Re: [Extension release] Last post subject on index

For us, there is a delay in displaying the index page when this extension is enabled.

Re: [Extension release] Last post subject on index

qubertman wrote:

For us, there is a delay in displaying the index page when this extension is enabled.

I will test it this evening and come back to you. No reason why it should slow it down that much (that I can see).

Re: [Extension release] Last post subject on index

For reference:

Generated in 0.058 seconds, 10 queries executed (without the extension)

Generated in 3.671 seconds, 10 queries executed (with the extension)

Thanks.

12 (edited by StevenBullen 2008-02-06 18:41)

Re: [Extension release] Last post subject on index

I have quickly tested it on PunDemo and the time does not change by much.

0.022 without
0.058 with

EDIT:
Ok the more forums you have the more strain. hmm

Re: [Extension release] Last post subject on index

Hopefully, this can be fixed.

Re: [Extension release] Last post subject on index

StevenBullen wrote:

Erm... Nah.

I meant as in the above extension adds a left join for the topics as t. So now if someone creates another extension and trys the same thing there will be a problem?

That kind of confliction. It might not happen on this query but what about other queries. hmm

You mean if another extension tries to add a left join? Yes, I suppose, but I think you might be overestimating how often an extension would want to do similar things (assuming of course there is no conflicting functionality). It's something to consider though: we might force extension writers to use topics AS <t_<ext_id>, for example.

Re: [Extension release] Last post subject on index

Can we make the name under the post clickable to the user profile as well?

Re: [Extension release] Last post subject on index

Added an index on last_post_id in the topics table which fixed the delay.

17 (edited by orlandu63 2008-02-08 21:44)

Re: [Extension release] Last post subject on index

Wouldn't

unset($pun_page['item_last_post']);

interfere with similar extensions?

18 (edited by StevenBullen 2008-02-09 02:12)

Re: [Extension release] Last post subject on index

Will release a new version tommorow. wink

@Bingiman: Will do...
@qubertman: Yep that fixes it. Im including it next release.
@orlandu63: Trying to think of a way around this... sad Will look at replacing first two items in array instead of clearing array. smile

19 (edited by StevenBullen 2008-02-09 03:46)

Re: [Extension release] Last post subject on index

Ok I have released another version. Its at punres... its also in the top post of this topic. You can also see it running here...

Any feedback would be appreciated. tongue

Re: [Extension release] Last post subject on index

Please add the date/time information of the post.

Re: [Extension release] Last post subject on index

Also, add the index for all database systems?

Re: [Extension release] Last post subject on index

Will do and will do... tongue

23 (edited by StevenBullen 2008-02-09 22:09)

Re: [Extension release] Last post subject on index

Ok I have released another version. Its at punres... its also in the top post of this topic. You can also see it running here...

Any feedback would be appreciated. tongue
Plus cant comment on the additional database types. sad I dont use them sorry.

Re: [Extension release] Last post subject on index

For titles less than 30 characters, the title attribute is being assigned the previous title greater than 30.

25 (edited by orlandu63 2008-02-09 21:50)

Re: [Extension release] Last post subject on index

Yeah, make sure to unset $ext_si_subject after each iteration.

nvm the rest -- i'm an idiot