Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

MyBB Help Desk


(Nov 3, 2014 04:37 PM)Red™ Wrote:  Thanks for the help, fixed the problem with my awards system.

(Nov 3, 2014 03:18 PM)Sucker for pain Wrote:  Vouch for nasyr, brilliant support and help :)

(Dec 27, 2014 08:33 PM)Autononymous Wrote:  I'd like to vouch for Nasyr, is a true MyBB guru.
Hi, maybe you can help me with a problem I neglected for some time now but need fixed for a theme I am building.

I want to display the last posters avatar.
My approach here is to create a variable holding the link to the avatar. As those links are saved in the users table I added the following code to "forumdisplay.php" on line 1257 shortly after $lastposter and $lastposteruid are defined.
Code
$query = $db->simple_select('users', 'avatar', "uid = $lastposteruid");
$result = $db->fetch_array($query);
$lastposter_avatar = $result['avatar'];
My assumption is that I can now use
Code
<img src="{$lastposter_avatar}" class="poster-img">
in my template to display the last posters avatar.

This however does not work as I expect it to. How would I go about this?
And whats the best practice for adding variables? (Maybe you can turn that into a tut one day)

Would appreciate you help on this :)
(Oct 25, 2014 01:18 PM)JumpWar Wrote:  
Code
$query = $db->simple_select('users', 'avatar', "uid = $lastposteruid");
$result = $db->fetch_array($query);
$lastposter_avatar = $result['avatar'];

Quote:$query = $db->simple_select('users', 'avatar', "uid = $lastposteruid");

change to

Quote:$query = $db->simple_select('users', 'avatar', "`uid` = '$lastposteruid'");

They make a difference.
[Image: CIbBKha.gif]
(Oct 25, 2014 03:29 PM).russo Wrote:  They make a difference.

Hi, thanks for the reply 🤝

Implemented your suggestion but didn't change anything as far as I can see. Also have no idea how to debug this properly.

Could you link me a source about using ` in queries? would like to learn more about that not sure which subject this would fall under.
(Oct 26, 2014 08:08 AM)JumpWar Wrote:  Hi, thanks for the reply 🤝

Implemented your suggestion but didn't change anything as far as I can see. Also have no idea how to debug this properly.

Could you link me a source about using ` in queries? would like to learn more about that not sure which subject this would fall under.

Can you link me to your forum so I can see it for myself?
(Oct 26, 2014 09:01 AM)Nasyr Wrote:  Can you link me to your forum so I can see it for myself?

Currently only have it on a local server. What would you want to look at?
The displayed forum just has an img tag with an empty src, would you want to see the templates?
Still offering support and now offering services: https://hackforums.net/showthread.php?tid=4505612
Are you able too offer any advice here please mate (ref-inferno shout):~

https://hackforums.net/showthread.php?ti...d=43127214
(Nov 2, 2014 01:01 PM)Rebel Energy Wrote:  Are you able too offer any advice here please mate (ref-inferno shout):~

https://hackforums.net/showthread.php?ti...d=43127214

Please send me a PM with your Skype so I can assist further.
how do i get these

https://gyazo.com/a02b3dd00ba1736fdac24dffacbc3d0b
(Nov 2, 2014 05:33 PM)Tabs Wrote:  how do i get these

https://gyazo.com/a02b3dd00ba1736fdac24dffacbc3d0b

Those are Tabs, made my Omni (Omniscient).
Paid Version: http://www.mybbcentral.com/thread-7687.html
Free Version: http://mods.mybb.com/view/mytabs

Paid version is the one HackForums use.
https://hackforums.net/showthread.php?tid=4514950

I have tried to fix this problem with the help from the other posts but I still continue to get the errors.
[Image: YFNJZfM.gif]
(Nov 2, 2014 09:59 PM)Red™ Wrote:  https://hackforums.net/showthread.php?tid=4514950

I have tried to fix this problem with the help from the other posts but I still continue to get the errors.

Have you followed the on screen instructions as shown?
(Nov 3, 2014 04:36 AM)Nasyr Wrote:  Have you followed the on screen instructions as shown?

What on screen instructions are you talking about?
[Image: YFNJZfM.gif]
Vouch for nasyr, brilliant support and help :)


Possibly Related Threads...
Thread / Author Replies Views Last Post
by ConcealSquadApr 12, 2017 08:37 PM 0 170 Apr 12, 2017 08:37 PM
Last Post: ConcealSquad
by DevixxDec 11, 2014 04:47 AM 0 120 Dec 11, 2014 04:47 AM
Last Post: Devixx
by StapletonNov 5, 2014 08:23 PM 5 456 Nov 5, 2014 08:23 PM
Last Post: Stapleton