Editing [img] bbcode help - adding alt tag

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Suggested Hosts
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Registered User
Posts: 46
Joined: Sun Jan 31, 2010 10:42 pm

Editing [img] bbcode help - adding alt tag

Post by cgworld » Mon Aug 23, 2010 2:57 am

Hello guys
I would like to edit the [img] bbcode so i can add the alt and title tags. Also alt and title tag will be generated from the topic title automatically + some other word which i will place, i don't want to be like this i know how to do this one :
[img alt="something"][/img]

i tried to edit the "bbcode.php" but coudlnt understand how it works :(
any help will be appreciated !


User avatar
Former Team Member
Posts: 7022
Joined: Thu Jun 04, 2009 1:41 am
Location: cheerleading practice
Name: Tabitha Backoff

Re: Editing [img] bbcode help - adding alt tag

Post by tbackoff » Mon Aug 23, 2010 9:38 am

This is going to be more then a simple few edits. If you are generating the alt tag from the topic title, you would have to run SQL queries on the topics table to get the name of the topic your in. Then passing that information to the img BBCode.

Like you said, it's much easier to have users type in their own alt tags (by making a new custom BBCode).
Flying is the second best thrill to cheerleaders; being caught is the first.

User avatar
Registered User
Posts: 5615
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン

Re: Editing [img] bbcode help - adding alt tag

Post by AmigoJack » Mon Aug 23, 2010 9:42 am

To define your own tag in go to ACP > Posting > BBCodes:

BBCode usage:

Code: Select all

HTML replacement:

Code: Select all

<img src="{URL}" alt="{INTTEXT} title="{INTTEXT}" />
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
We will not come anybody anyway, nevertheless, it's best to shit this.


Return to “[3.0.x] Support Forum”