MyBB Community Forums
Most variables not working on forumdisplay_thread - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: Most variables not working on forumdisplay_thread (/thread-174304.html)

Pages: 1 2 3 4 5


Most variables not working on forumdisplay_thread - XP Mai - 2015-08-10

Variables like
{$post['fid5']},{$useravatar['image']},{$useravatar['width_height']},{$username}

They aren't working, they just blank.


RE: Most variables not working on forumdisplay_thread - Ad Bakker - 2015-08-10

Can you make clear where (in which template) they don't work. The definition of variables depend on the php script that evaluates the templates.


RE: Most variables not working on forumdisplay_thread - XP Mai - 2015-08-11

forumdisplay_thread


RE: Most variables not working on forumdisplay_thread - Ad Bakker - 2015-08-11

(2015-08-10, 07:33 PM)XP Mai Wrote: {$post['fid5']},{$useravatar['image']},{$useravatar['width_height']},{$username}

These variables have not been set in script forumdisplay.php when the forumdisplay_thread template is evaluated.

Can you please explain what you are trying to achieve.


RE: Most variables not working on forumdisplay_thread - XP Mai - 2015-08-11

Trying my best working on the forum layout.

http://forum.international-union.com/forumdisplay.php?fid=27

I want to add OP's info at the right side, while left side is deal info.


RE: Most variables not working on forumdisplay_thread - Ad Bakker - 2015-08-11

I'm afraid that what you want to achieve is only possible by either a plugin or by making changes in the forumdisplay php script.
Changing php scripts is not really advised, because it can cause problems when new upgrades of the forum software become available. You should have a good book-keeping of all the changes you have made.


RE: Most variables not working on forumdisplay_thread - XP Mai - 2015-08-11

The current forumdisplay on the particular forum is actually a separated template, made it possible by the XThread plugin.

So after upgrades, I'm still having the same template and still able to use the latest version without worry of losing work.

As for the changes to be made, can you please advise me?


RE: Most variables not working on forumdisplay_thread - Ad Bakker - 2015-08-11

I am sorry, but I have no experience with XThread at all.


RE: Most variables not working on forumdisplay_thread - XP Mai - 2015-08-11

(2015-08-11, 03:07 PM)Ad Bakker Wrote: I'm afraid that what you want to achieve is only possible by either a plugin or by making changes in the forumdisplay php script.

Continue.


RE: Most variables not working on forumdisplay_thread - Ad Bakker - 2015-08-11

One of the variables that you mention is already available. This is $username, which you should alter in $thread['username'].

The others require more elaboration, we could do that one by one.

Which information is in $post['fid5']?