[REQ] Insert username in threads/posts.
#1
Hi, I've looked for this everywhere, I'm sure it's possible to do it in MyCode :
I'm looking for a code that will insert your username in the post or topic you are reading, just like your name is inserted in the header ("Welcome back, AliaErenel.") but inside a thread.

Something like this :
Quote:This is an important invitation ! Hi {username}, how would you like to do that ?
Where {username} would be replaced by your own username.

I'm managing a roleplaying forum and it would be nice if members could use that code to enhance their story, announcements, and to get the reader's attention.

Hopefully it can be done, thank you for everything !
Reply
#2
You can't do this with MyCode.

You would need a plugin.
No longer involved in the MyBB project.
Reply
#3
Check out my advanced mycode permissions plugin, you will then be able to create a mycode that does this.
Reply
#4
Dang... I thought it would be quite easy to do. I don't know how to write plugins at all.

Thank you for your answers !
(2010-09-14, 03:56 PM)Jammerx2 Wrote: Check out my advanced mycode permissions plugin, you will then be able to create a mycode that does this.

Have you ever tried to do it ? I'd like to know what you have in mind, suggesting your plugin Smile.
Reply
#5
Make sure my advanced mycode permissions plugin is installed, which can be found at the following link.

http://mods.mybb.com/view/advanced-mycode-permissions

Create a new mycode, set the regular expression to something like \[username\] and the replacement to {$mybb->user['username']}.
Reply
#6
(2010-09-15, 07:26 PM)Jammerx2 Wrote: Make sure my advanced mycode permissions plugin is installed, which can be found at the following link.

http://mods.mybb.com/view/advanced-mycode-permissions

Create a new mycode, set the regular expression to something like \[username\] and the replacement to {$mybb->user['username']}.

I see. Thank you, I'll try it asap.
(2010-09-15, 11:22 PM)AliaErenel Wrote:
(2010-09-15, 07:26 PM)Jammerx2 Wrote: Make sure my advanced mycode permissions plugin is installed, which can be found at the following link.

http://mods.mybb.com/view/advanced-mycode-permissions

Create a new mycode, set the regular expression to something like \[username\] and the replacement to {$mybb->user['username']}.

I see. Thank you, I'll try it asap.

Excellent ! It is working fine. Very useful plugin, thank you very much.
Reply
#7
Thanks, this works perfectly. How would I go about getting this to work in a shoutbox though?
Reply
#8
Hmm, Didn't work for me. I got an error message that flashes up when I saved the my code. Using a trusty print screen it is some kind of function implode, which is above my levels of understanding. Attached a screenshot if it might be useful.

When I test it in your test box it comes up with the {$mybb->user['username']} in the html and in the display.


Attached Files Thumbnail(s)
   
Just taken over The Gamers Forum. We have big plans and if you are a gamer do come and join us! We would love to see you! Come win Prizes and more!

[Image: banner.jpg]
Reply
#9
(2010-10-09, 01:47 AM)vash Wrote: Hmm, Didn't work for me. I got an error message that flashes up when I saved the my code. Using a trusty print screen it is some kind of function implode, which is above my levels of understanding. Attached a screenshot if it might be useful.

When I test it in your test box it comes up with the {$mybb->user['username']} in the html and in the display.

I will fix that error in the next update, for now just select all groups for who can view.
Reply
#10
Hmm... I still cant get it to work. I presume mybb refers to the database prefix? If I have changed this and replaced mybb with the new database prefix should it work of is there a setting inside the php which I also need to change?
Just taken over The Gamers Forum. We have big plans and if you are a gamer do come and join us! We would love to see you! Come win Prizes and more!

[Image: banner.jpg]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)