Displaying name on Page
#11
OK, I start to understand. Do you construct this ShowGroups page with a plugin, or by a core change op MyBB's php files?
Regards, Ad Bakker (NL)
Reply
#12
(2015-08-01, 05:57 PM)Ad Bakker Wrote: OK, I start to understand. Do you construct this ShowGroups page with a plugin, or by a core change op MyBB's php files?
I manually added a php file in the mybb root and added a template for it. Not a plugin, but not my work
Reply
#13
In your php program put this line at the start:


require_once(MYBB_ROOT . '/inc/functions.php');

Suppose the group leader has username $group_leader and has uid $group_leader_uid, you can construct his profile link by:

$group_leader_profile_link = build_profile_link($group_leader, $group_leader_uid);

Then replace the <a......><SilentThief</a> line in your template by {$group_leader_profile_link}.

I think this is what you are looking for.


When you do not have the group leader variables above available, we must find them with a MySQL query for the case you know the group id (gid). Let this know then I will show the necessary query.
Regards, Ad Bakker (NL)
Reply
#14
(2015-08-01, 06:13 PM)Ad Bakker Wrote: In your php program put this line at the start:


require_once(MYBB_ROOT . '/inc/functions.php');

Suppose the group leader has username $group_leader and has uid $group_leader_uid, you can construct his profile link by:

$group_leader_profile_link = build_profile_link($group_leader, $group_leader_uid);

Then replace the <a......><SilentThief</a> line in your template by {$group_leader_profile_link}.

I think this is what you are looking for.
These functions just error me...
Is there any way to just replace "SilentThief" with his UID and that would display his name?
Reply
#15
(2015-08-01, 06:29 PM)xunofar Wrote: Is there any way to just replace "SilentThief" with his UID and that would display his name?

Sorry, but no. This has to be done in the php program. There is a possibility that this can be made possible with the plugin php in templates, but I have no experience with that.

You could make a zip of your php file and your template and attach that to a message here. Then I can look at it. Alternatve is that you send these by email, send me a PM for my e-mail address.
Regards, Ad Bakker (NL)
Reply
#16
Ok thanks, I don't need to have that large of a hassle. For now I'll just do it manually.
Reply
#17
(2015-08-01, 06:50 PM)xunofar Wrote: Ok thanks, I don't need to have that large of a hassle. For now I'll just do it manually.

OK, your choice. Don't hesitate to PM me when you change your mind.
Regards, Ad Bakker (NL)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)