S_Username BBCode

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
Sniper_E
Registered User
Posts: 782
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: S_Username BBCode

Post by Sniper_E » Fri Jun 28, 2019 11:40 pm

John connor wrote:
Thu Jun 20, 2019 5:30 am
Question: How do I create a custom icon for the BBcode?
Yes, I would have set that template up better for ABBC3 but he did not have a user.gif image in his collection.

I created a user.gif image if you do not have one. Image
Copy that image and Save as ext/vse/abbc3/images/icons/user.gif

Edit the s_username/styles/all/template/event/vse_one.html

Code: Select all

{% if U_USE_S_USERNAME_BBCODE && S_BBCODE_ALLOWED %}
	<input type="button" class="abbc3_button" name="s_username" value=" " style="background-image:url('{ROOT_PATH}{ABBC3_BBCODE_ICONS}/user.gif');" onclick="insert_text('{{ lang('S_USERNAME_TAG') }}');return false;" title="{{ lang('S_USERNAME_EXPLAIN') }}" />
{% endif %}
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
:!: Sniper_E Styles | phpbbmodders :!:

User avatar
3Di
Former Team Member
Posts: 13901
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: S_Username BBCode

Post by 3Di » Sat Jun 29, 2019 3:05 am

Well I don't want to ruin a party here but if I can say there is no need of an image icon since 3.2 uses FA icons
https://fontawesome.com/v4.7.0/icon/user

Moreover there is no need of any JS since you can use the native s9e facilities.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

User avatar
Sniper_E
Registered User
Posts: 782
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: S_Username BBCode

Post by Sniper_E » Sat Jun 29, 2019 4:53 am

ABBC3 and Posting Buttons both use icon images in their extensions. We are adding a user image in this ext in order to match the high quality of images VSE has in his posting buttons. I do not think FA-icons or S9 will work in his extension. The Posting Buttons ext also uses images in it's posting buttons. I have a user.png image I can add in it's template also in the next update.

Am I missing something 3DI that I'm not understanding?
Or did you simply overlook that thsee are two extensions that use images for their posting buttons we are working with? It does use a FA-icon on regular posting.
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
:!: Sniper_E Styles | phpbbmodders :!:

User avatar
thecaretaker1
Registered User
Posts: 49
Joined: Tue Dec 30, 2014 8:38 pm

Re: S_Username BBCode

Post by thecaretaker1 » Sat Jun 29, 2019 10:07 am

I find this ext really useful. I use it to add a simple time of day welcome at the top of the index page using the announcement ext. It works really well. Thank you.

I'm just wondering, is there anything I can do to add the users avatar before the s_username so it shows like it does at the top right of the forum?

I know there are dedicated extensions to welcome users but I find they show far too much information. This method is really simple and just what I want.


Image

User avatar
Sniper_E
Registered User
Posts: 782
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: S_Username BBCode

Post by Sniper_E » Sat Jun 29, 2019 7:13 pm

I'm testing this in the announcement ext also. Contact page too.
Maybe another bbcode can be created to show user's small avatar.
Then you can add that in your line before the [s_username /]

I would have to check to see what that will take to make happen.
But that would be for another project.
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
:!: Sniper_E Styles | phpbbmodders :!:

User avatar
Sniper_E
Registered User
Posts: 782
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: S_Username BBCode

Post by Sniper_E » Sun Jun 30, 2019 8:21 pm

Updated first post with version 1.0.2

Abbc3 and posting buttons are setup now.
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
:!: Sniper_E Styles | phpbbmodders :!:

User avatar
John connor
Registered User
Posts: 2175
Joined: Fri Nov 14, 2014 5:14 pm
Location: U S Of A
Name: Aaron
Contact:

Re: S_Username BBCode

Post by John connor » Wed Jul 03, 2019 10:30 am

Got a bit of an issue. Under the board announcement extension the icon for this BBcode is not there. But in a posting page the icon is there.

Image

User avatar
Sniper_E
Registered User
Posts: 782
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: S_Username BBCode

Post by Sniper_E » Wed Jul 03, 2019 9:47 pm

First off this is how your text should look in there.

Code: Select all

[fade][s_username /][/fade] test
You used the bbcode to enter that in there. Display in posting: No on the bbcode.
This extension inserts text into the textarea from the language file and not from the bbcode.

And I screwed up and left the images out of the adm/style/images directory.

First post download updated with adm images. Same version.
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
:!: Sniper_E Styles | phpbbmodders :!:

User avatar
John connor
Registered User
Posts: 2175
Joined: Fri Nov 14, 2014 5:14 pm
Location: U S Of A
Name: Aaron
Contact:

Re: S_Username BBCode

Post by John connor » Wed Jul 03, 2019 10:32 pm

That code was what I got because I had the don't show on posting page checked. When I unchecked that option the code went to the code you indicated.

It was like that before when I first started using this extension and it was there in my screen shot since you didn't include the image in the ADM style. I will now try your new version latter on.

Post Reply

Return to “Extensions in Development”