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.
Ideas Centre
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 »

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: 7063
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 »

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: 5853
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン

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

Post by AmigoJack »

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 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." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28

Return to “[3.0.x] Support Forum”