re ALTT working with another mod

current version: 1.3.3
released: 07.10.2011

re ALTT working with another mod

Postby DV1 » Thu Nov 17, 2011 10:14 pm

Hi, NickV

I wanted to post here with regard to the Advanced Last Topic Titles. Specifically, how it works - or in this case does not work - in combination with another mod.

Some time ago, David IQ from the phpBB forums was kind enough to make a specialized mod for a request of mine. I say "specialized" because it was never put forth as an actual mod in the modifications section. The story behind this mod is here.

To put it briefly, I had asked if there was a mod that could show the last two posters of a topic. In other words, instead of just showing the last post as made by "John", it would show it as "Mary, John"; meaning that Mary made a post before John.

The mod worked out well but I could only use it on the viewforum page. But the instructions that he gave for the index page made everything a little crazy in that the names of posters who had nothing to do with that particular topic were showing up as having posted in the topic.

The problem was narrowed down to the fact that I was using the 'Latest Topic Title mod of another phpBB forum member, "ABDev". The problem was not ABDev's mod, it was that the specialized mod also had to make changes in the code where the LTT had made changes.

Recently I updated the board with a new theme and all that and so I decided to use your ALTT mod. It works beautifully and I wondered if I could make the specialized mod work with it on the index page instead of only in viewforum. So, I went to the following section of code in forumlist_body.html:

Code: Select all
<!-- IF forumrow.LAST_POST_TIME --><dfn>{L_LAST_POST}</dfn>  <!-- IF S_ALTT_ACTIVE --><!-- IF forumrow.ALTT_LINK_NAME_SHORT --><a <!-- IF ALTT_STYLE -->style="{ALTT_STYLE}"<!-- ENDIF --> href="{forumrow.U_ALTT_LINK}" title="{forumrow.ALTT_LINK_NAME}">{forumrow.ALTT_LINK_NAME_SHORT}</a><!-- ELSE -->{L_ALTT_PROTECTED}<!-- ENDIF --><br /><!-- ENDIF --> {L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL}


When DavidIQ gave me the coding for this section I told him it wasn't like the basic prosilver one since it had been modified by ABDev's LTT. He said in that case all I had to do was replace this:

Code: Select all
{forumrow.LAST_POSTER_FULL}


with this:

Code: Select all
<!-- IF forumrow.LAST_POST_TIME --><dfn>{L_LAST_POST}</dfn> {L_POST_BY_AUTHOR}<!-- IF forumrow.SECOND_LAST_POSTER_FULL --> {forumrow.SECOND_LAST_POSTER_FULL},<!-- ENDIF --> {forumrow.LAST_POSTER_FULL}


As I already mentioned I tried it then and everything as mentioned before got confusing. I recently tried this same change of code with your ALTT and the effect was the same; it showed names of posters that had not posted in the topic and even showed the "Anonymous" poster such as "Anonymous, John".

Since you made the ALTT mod, I was wondering if you knew of a way in which the mod code that DavidIQ gave me for the index page could fit better with your ALTT code so it would show the correct names of the posters in the topic. By the way, DavidIQ worked this code out on prosilver without any totpic title mod and he said it worked perfectly. So, it seems all about the conflict of coding between the two mods.

Lastly, it would be all right if I could use the ALTT and the specialized mod only the index page rather than viewforum. I say that because in case you go to the thread on phpBB about this that I linked to you will see all the coding for viewforum too. It would be excellent to have both mods working well and on both pages, but if I can get 50% of the deal on the index page then I would be a happy camper. :)

Please excuse if this post was a little long but I figure best to explain it as clearly as possible.

Thank You

Daniel
DV1
Posts < 10
Posts < 10
 
Posts: 9
Topics: 2
Joined: Thu Nov 10, 2011 6:23 am

Re: re ALTT working with another mod

Postby nickvergessen » Fri Nov 18, 2011 12:43 pm

This might take sometime, I hope I remember it later, else please push in 24h or more

For me as note: http://www.phpbb.com/community/viewtopi ... #p12927639
cheers nickvergessen :geek:

Member of phpBB Development-Team
No Support via PM
User avatar
nickvergessen
Administrator
Administrator
 
Posts: 5753
Topics: 218
Images: 139
Joined: Mon Oct 15, 2007 4:15 pm
phpBB.de: nickvergessen
phpBB.com: nickvergessen

Re: re ALTT working with another mod

Postby DV1 » Fri Nov 18, 2011 3:47 pm

NickV

Thank you for responding.

Take whatever time is necessary. Who knows, it's a nice little mod and you may even be able to incorporate it in one of your own. I don't think DavidIQ would mind since he never made it into an actual mod and I never got any more feedback from him.

And again, if it can only work on the index page that's fine.

Sending you a PM with the address of the forum so you can see where the mod will be used.

Cheers

Daniel
DV1
Posts < 10
Posts < 10
 
Posts: 9
Topics: 2
Joined: Thu Nov 10, 2011 6:23 am

Re: re ALTT working with another mod

Postby DV1 » Sun Nov 27, 2011 10:01 pm

NickV

I know you said bump it in 24hr but I thought I'd wait some days before doing so to see if there were any developments.

Thanks
DV1
Posts < 10
Posts < 10
 
Posts: 9
Topics: 2
Joined: Thu Nov 10, 2011 6:23 am

Re: re ALTT working with another mod

Postby DV1 » Sun Dec 04, 2011 5:23 pm

Hi, Nick

Just doing the weekly bump on this to see if any developments.

Thanks
DV1
Posts < 10
Posts < 10
 
Posts: 9
Topics: 2
Joined: Thu Nov 10, 2011 6:23 am

Re: re ALTT working with another mod

Postby nickvergessen » Wed Dec 07, 2011 8:58 pm

well it should be something like:
find:
Code: Select all
$sql = 'SELECT p.topic_id, p.forum_id, u.username, u.user_id, u.user_colour

replace with:
Code: Select all
$sql = 'SELECT p.topic_id, p.forum_id, p.post_subject, p.post_id, u.username, u.user_id, u.user_colour


find:
Code: Select all
$second_last_poster[$forum_id]['user_colour']) : ''),

after add in new line:
Code: Select all
          'SECOND_LAST_SUBJECT'   => (isset($second_last_poster[$forum_id]) ? $second_last_poster[$forum_id]['post_subject'] : ''),
          'U_SECOND_LAST_POST'   => (isset($second_last_poster[$forum_id]) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $second_last_poster[$forum_id]['post_id']) . '#p' . $second_last_poster[$forum_id]['post_id'] : ''),


and for the template
find:
Code: Select all
<!-- IF S_ALTT_ACTIVE -->

after add:
Code: Select all
<!-- IF forumrow.U_SECOND_LAST_POST --><a <!-- IF ALTT_STYLE -->style="{ALTT_STYLE}"<!-- ENDIF --> href="{forumrow.U_SECOND_LAST_POST}">{forumrow.SECOND_LAST_SUBJECT}</a><!-- ENDIF -->


But the hole thing did not work correctly for me
cheers nickvergessen :geek:

Member of phpBB Development-Team
No Support via PM
User avatar
nickvergessen
Administrator
Administrator
 
Posts: 5753
Topics: 218
Images: 139
Joined: Mon Oct 15, 2007 4:15 pm
phpBB.de: nickvergessen
phpBB.com: nickvergessen

Re: re ALTT working with another mod

Postby DV1 » Thu Dec 08, 2011 3:36 am

Now, before I try any of this are you saying in the last line that the "whole" thing, meaning the way you coded it, did not work correctly in getting the second poster's name to show?
DV1
Posts < 10
Posts < 10
 
Posts: 9
Topics: 2
Joined: Thu Nov 10, 2011 6:23 am

Re: re ALTT working with another mod

Postby nickvergessen » Thu Dec 08, 2011 12:28 pm

It did not grab the owner of the second last post for me, but any other last topic poster, thereby it also grab that post.
the problem is, the SQL query you have orders the result by post_time and not the list before grouping. I don't even know whether this is simple fixable.
cheers nickvergessen :geek:

Member of phpBB Development-Team
No Support via PM
User avatar
nickvergessen
Administrator
Administrator
 
Posts: 5753
Topics: 218
Images: 139
Joined: Mon Oct 15, 2007 4:15 pm
phpBB.de: nickvergessen
phpBB.com: nickvergessen

Re: re ALTT working with another mod

Postby DV1 » Wed Dec 14, 2011 12:39 am

Since we already know that this works on the index page if the ALTT mod were not being used, then the problem as we have been discussing here is the mix of the coding. What I'm now wondering is if this could be made to work if there were a way to separate the function of each mod into its own section. Here's what I mean by an image I made in Photoshop:

Image

Of course, since I do not know PHP extensively I'm assuming that all the different sections of the forum had to be made and so possibly the same could be done in this instance.
DV1
Posts < 10
Posts < 10
 
Posts: 9
Topics: 2
Joined: Thu Nov 10, 2011 6:23 am

Re: re ALTT working with another mod

Postby DV1 » Mon Dec 26, 2011 3:54 pm

BUMP
DV1
Posts < 10
Posts < 10
 
Posts: 9
Topics: 2
Joined: Thu Nov 10, 2011 6:23 am

Next

Return to NV advanced last topic titles

Who is online

Users browsing this forum: No registered users and 1 guest