![]() |
Hello [username]!
Wherever I put this tag in my title, post or sig your logged in username will appear. If you're not logged in then something else pre-defined will show up.
I have seen this in action on a live board. How can I do it? I searched this forum but I haven't had a lot of luck :( Thank you. |
Hookname: global_complete
PHP Code:
|
Ok, couple of questions.
So, I can start a topic that says "Hi [username], how are you today?" and it will output for instance, "Hi KirbyDE, how are you today?" What file does this go in to? |
1) Yes
2) No File - Hook global_complete |
Thank you :)
What would it display to a user who is not logged in? How can it be : "Guest" ? |
Unregistered User or smth. like that.
|
<off topic>
KIRBY! Please contact me ASAP! I need the a file you changed for me. It's URGENT! Barry@waccobb.net |
How do we make the plug-in for this?
|
It doesn't work with 3.5.0 RC 1 for me.
Any idea why? |
Just tested, works fine for me on RC 1
|
Any way to get it to work with editpost?
|
It works everywhere, just like replacement Variables.
|
Quote:
Blows the one I did for vb3 all to you-know-what. One less I have to mess with. ;) |
But it doesn't work in the archive. Any way to fix that?
|
Not without a File edit ...
|
And what would that be?
|
Easiest way:
At start of index.php put PHP Code:
PHP Code:
|
Then that should cover it for the whole site, right?
|
For the whole archive, yes.
|
For some reason, that didn't work. :(
|
Hmm .. it should.
You edited the correct index.php (rember there are three of them), right? |
The archive index.php, right?
|
Yes. Just tested, does work for me.
|
Ok, where exactly did you put it? I did it right after the opening php tag and right before the ending one.
|
Above
PHP Code:
|
Damn! It still shows the actual [you] tag and not the username in the archive post. I did the edit exactly as you said, too. :(
|
Scratch that last post. It works. ;)
I'm too embarrassed to admit what I did so that will be MY secret (like the thread creationtime?) ;) |
This line is giving me fits:
PHP Code:
EDIT: I changed it to this and I no longer get any errors. PHP Code:
|
Yeah, that was a typo :)
Hmm, don't know why it isn't working for you - works for me. |
Is there another way to do it then? It's got me stumped.
|
Think so. But IMHO the way I posted is the easiest.
PM me FTP details and i'll take a look. |
I found the problem. I was using [username] in the first variable where I should have been using [you]. DUH on me! ;)
It works like a charm now. ;) Thank you, sir. ;) |
hm, i can't seem to get it. i just put the php code in the arcive.index and it shoudl show the userid when [username] is typed ? in the title and in the body ? cuz it doesn't show for me. do i have to activate something ?
|
working fine, THX kirby :)
|
Wow first time working with code like this and it was a charm, you rock Andreas thank you, I have been looking for this forever for both versions.
|
Quick question; how come when you use quick edit and enter [username] it is displayed as "[username]" not "KerbyDE"?
Thanks, Mat |
Very nice. Could be very useful in a lot of situations.
|
When I edit the post, then save, it shows [username] and not themusicman or whatever???
|
^ ^
yeah. If you 'go advanced' it gets fixed, however it's no longer dynamic... |
^ Thanks.
Is there any way this can be enhanced so as only Admins/Smods/Mods can use it? Is there a conditional I can wrap around the php code to effect this? Cheers. |
All times are GMT. The time now is 04:52 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|