PDA

View Full Version : Mini Mods - Last Poster Avatar


Pages : 1 [2]

SoHelpMe
11-08-2014, 03:50 AM
Well, I finally figured out the subforum thing. Requires code edits, as there aren't any hooks nearby. Open up /includes/functions.php

Find:
$threadinfo = array(

Add in your avatar variables like below (be careful with commas!)

$threadinfo = array(
'title' => $lastpostinfo['lastthread'],
'threadid' => $lastpostinfo['lastthreadid'],
'avatardateline' => $lastpostinfo['avatardateline'],
'hascustomavatar' => $lastpostinfo['hascustomavatar']

Then you can simply call these variables in a forumhome plugin like so:

$lp_dateline = $lastpostinfo['avatardateline'];
$lp_userid = $lastpostinfo['userid'];
$hascustomavatar = $lastpostinfo['hascustomavatar'];

You can even do this without the forumhome plugin just by getting the variables from template. (Still need the query plugin, of course).

Best of luck!

I have been thinking about picking up this app and installing it but I have been a bit concerned to get it and load it based on it requiring source code edits to work correctly. Findingpeace have you considered making the required posts and updating the source code posted on this thread? From what I have seen elsewhere on other non supported mods you don't have to take over sustaining ownership but you could make an incremental improvement. I hope you consider making tha changes and reposting the files... Thanks

concepts
01-17-2015, 04:02 PM
Works amazing for me on 4.2.2, great Mod!

Manoel J?nior
01-18-2015, 11:41 AM
Error vB 4.2.3 Beta 3

Database error in vBulletin 4.2.3 Beta 3:

Invalid SQL:

SELECT
IF(votenum >= 1, votenum, 0) AS votenum,
IF(votenum >= 1 AND votenum > 0, votetotal / votenum, 0) AS voteavg,
post.pagetext AS preview,thread.firstpostid, post.pagetext AS thumb,
thread.threadid, thread.title AS threadtitle, thread.forumid, thread.pollid, thread.open, thread.postusername, thread.postuserid, thread.iconid AS threadiconid,
thread.dateline, thread.notes, thread.visible, thread.sticky, thread.votetotal, thread.attach, thread.lastpost, thread.lastposter, thread.lastposterid, thread.lastpostid, thread.replycount, IF(thread.views<=thread.replycount, thread.replycount+1, thread.views) AS views,
thread.prefixid, thread.taglist, thread.hiddencount, thread.deletedcount, user.userid,
user.membergroupids, user.infractiongroupids, user.usergroupid, user.homepage, user.options AS useroptions, IF(userlist.friend = 'yes', 1, 0) AS isfriend,
user.lastactivity, user.lastvisit, IF(user.options & 512, 1, 0) AS invisible

, NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed
, deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason

, threadredirect.expires
, usergrouphasann.opentag as opentaghasann, usergrouphasann.closetag AS closetaghasann, usergrouphuseyinn.opentag AS opentaghuseyinn, usergrouphuseyinn.closetag AS closetaghuseyinn,IF(customavatar.userid, 1, 0) AS useavatar, uposter.userid AS useravatarid, uposter.avatarrevision
, user.avatarrevision AS avatarrevision, thread.lastposterid AS userid, avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline,customavatar.width AS avwidth,customavatar.height AS avheight
FROM thread AS thread
LEFT JOIN user AS user ON (user.userid = thread.lastposterid)
LEFT JOIN userlist AS userlist ON (userlist.relationid = user.userid AND userlist.type = 'buddy' AND userlist.userid = 1)

LEFT JOIN deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND deletionlog.type = 'thread')
LEFT JOIN subscribethread AS subscribethread ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = 1 AND canview = 1)

LEFT JOIN post AS post ON(post.postid = thread.firstpostid)

LEFT JOIN threadredirect AS threadredirect ON(thread.open = 10 AND thread.threadid = threadredirect.threadid)
LEFT JOIN user AS userhasann ON ( userhasann.userid = thread.postuserid ) LEFT JOIN usergroup AS usergrouphasann ON ( usergrouphasann.usergroupid = userhasann.usergroupid ) LEFT JOIN user AS userhuseyinn ON ( userhuseyinn.userid = thread.lastposterid ) LEFT JOIN usergroup AS usergrouphuseyinn ON ( usergrouphuseyinn.usergroupid = userhuseyinn.usergroupid )
LEFT JOIN user AS uposter ON (uposter.userid = thread.postuserid)
LEFT JOIN customavatar AS customavatar ON (customavatar.userid = uposter.userid)
LEFT JOIN avatar AS avatar ON(avatar.avatarid = user.avatarid) LEFT JOIN customavatar AS customavatar ON(customavatar.userid = user.userid)
WHERE thread.threadid IN (0,1104,1103,1108,1123,1101,1110)
ORDER BY thread.sticky DESC, lastpost DESC;

MySQL Error : Not unique table/alias: 'customavatar'
Error Number : 1066

Ang3ls
01-30-2015, 02:09 AM
how to I can show Avatar in mobile Style?
Thank you very much!

tanzeelniazi
02-01-2015, 06:56 PM
Hello all today install last post avatar but its not showing correctly
I want this type
https://vborg.vbsupport.ru/attachment.php?attachmentid=135122&d=1324027633

Mine showing is this
https://vborg.vbsupport.ru/external/2015/03/16.png

See first avatar showing after Last post icon is showing and name is showing below so i want above pic like this
hope all understand
My skin is Ideal VB Black

Also How to Turn Off last post icon ???
if i use last post avatar and showing avatar and last post icon looking bad so i want to turf off last post icon

Tibiaspy
03-03-2015, 03:12 PM
Well, I finally figured out the subforum thing. Requires code edits, as there aren't any hooks nearby. Open up /includes/functions.php

Find:
$threadinfo = array(

Add in your avatar variables like below (be careful with commas!)

$threadinfo = array(
'title' => $lastpostinfo['lastthread'],
'threadid' => $lastpostinfo['lastthreadid'],
'avatardateline' => $lastpostinfo['avatardateline'],
'hascustomavatar' => $lastpostinfo['hascustomavatar']

Then you can simply call these variables in a forumhome plugin like so:

$lp_dateline = $lastpostinfo['avatardateline'];
$lp_userid = $lastpostinfo['userid'];
$hascustomavatar = $lastpostinfo['hascustomavatar'];

You can even do this without the forumhome plugin just by getting the variables from template. (Still need the query plugin, of course).

Best of luck!

I can do the whole edit file thing no problem but I don't get what should I do next? What is forumhome plugin? Where do I put all this stuff?

Developer is long gone, is anyone willing to repair this bug for him? This is very nic plugin but with subforums not working it's not usable atm :/

ku-med
03-20-2015, 11:40 PM
Hello all today install last post avatar but its not showing correctly
I want this type
https://vborg.vbsupport.ru/attachment.php?attachmentid=135122&d=1324027633

Mine showing is this
https://vborg.vbsupport.ru/external/2015/03/16.png

See first avatar showing after Last post icon is showing and name is showing below so i want above pic like this
hope all understand
My skin is Ideal VB Black

Also How to Turn Off last post icon ???
if i use last post avatar and showing avatar and last post icon looking bad so i want to turf off last post icon

I've the same problem :(

To remove last post icon -> edit the following template [ forumhome_lastpostby ]

find and remove:
<vb:if condition="$show['icon']"><img src="{vb:raw icon.iconpath}" class="postimg" alt="{vb:raw icon.title}" border="0" /></vb:if>

kikaclub
03-22-2015, 09:23 PM
Well, I finally figured out the subforum thing. Requires code edits, as there aren't any hooks nearby. Open up /includes/functions.php

Find:
$threadinfo = array(

Add in your avatar variables like below (be careful with commas!)

$threadinfo = array(
'title' => $lastpostinfo['lastthread'],
'threadid' => $lastpostinfo['lastthreadid'],
'avatardateline' => $lastpostinfo['avatardateline'],
'hascustomavatar' => $lastpostinfo['hascustomavatar']

Then you can simply call these variables in a forumhome plugin like so:

$lp_dateline = $lastpostinfo['avatardateline'];
$lp_userid = $lastpostinfo['userid'];
$hascustomavatar = $lastpostinfo['hascustomavatar'];

You can even do this without the forumhome plugin just by getting the variables from template. (Still need the query plugin, of course).

Best of luck!

not working... and this
$threadinfo = array(
is not in functions.php

keyla31
03-27-2015, 07:03 PM
looked like it worked on 4.2.2 Patch Level 4 but upon entering forums received database error page, uninstalled

ku-med
03-27-2015, 07:37 PM
looked like it worked on 4.2.2 Patch Level 4 but upon entering forums received database error page, uninstalled

Works great for me on 4.2.2 pl 4 .. anyway might this work for ya ->
https://vborg.vbsupport.ru/showthread.php?t=268618

FlexGraphics
05-26-2016, 04:10 PM
It's a shame that this doesnt work, it's a XenForo script just thought I'd let you know!

http://s.imandings.com/1lbjh

TheLastSuperman
05-27-2016, 06:12 PM
It's a shame that this doesnt work, it's a XenForo script just thought I'd let you know!

http://s.imandings.com/1lbjh

Reported to work though... I have not tested to confirm. I'm curious though, it shows in a thread whether you've downloaded a mod or not, it states "Not Download" beside your name so aside from a screenshot, how do you know?

Thread avatars were around in vBulletin before Xenforo was made from what I recall, in fact may have been in IPB before vB that I'm not sure of though (simply saying). What site were you on when viewing that source code? I ask because I don't see a demo link anywhere and just because <!-- Commented Out Code --> exist on a site does not make said code "the truth, it's on the interwebs is why" and may actually just be someone who prefers XF over vB and made a comment in their code because the thread avatars in vB remind them of the ones they know of in XF etc but again not sure as no link other than a screenshot.

Davidinh
12-22-2016, 04:26 PM
From info's KiKaclub
if you don't want the lastpost icon show go to Admin > Setting > Options > Thread display options (showthread) in the 4th box (show default post Icon) empty it (leave it blank) click save

you don't need to modify the template at all

The other thought that mode word fine on vb 4.2.5
I ran it on IIS7 server and MySQL 5.7

Thank you very much for your sharing this mode phpdesk

spielo1312
08-25-2019, 03:51 AM
I really like this plugin, but it not work anymore with php 7.3

is there any other plugin do the same job?

KodakUK
04-22-2020, 04:59 PM
How do I align the avatar to the left so that the thread title, author and date show on the left and not below the image.

Is it possible to increase the avatar size on this mod aswell, it's a tad small.

VinceOrlando
10-23-2020, 12:53 AM
Did anyone ever find a fix for the wrong avatars showing on forum home when that forum has subforums?