[RFC] Predefined HTML inserts in posts

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
Post Reply
rien
Registered User
Posts: 4
Joined: Sat Jan 14, 2012 7:08 pm

[RFC] Predefined HTML inserts in posts

Post by rien »

Allow the insertion of HTML snippets into a message using a predefined map.
Example: [html]{id}[/html]
The {id} would refer to a map in which each {id} is mapped to a certain HTML snippet.
A screen would be necessary to allow administrators and/or moderators to enter the HTML snippets and associate them with ids.
The purpose is for the insertion of affiliate links into messages.
By using a map an update of an affiliate link can be made centrally into the map itself without the need to go through all messages in which it might be used.

User avatar
A_Jelly_Doughnut
Registered User
Posts: 1780
Joined: Wed Jun 04, 2003 4:23 pm

Re: [RFC] Predefined HTML inserts in posts

Post by A_Jelly_Doughnut »

How does this idea differ from custom BBCodes?
A_Jelly_Doughnut

rien
Registered User
Posts: 4
Joined: Sat Jan 14, 2012 7:08 pm

Re: [RFC] Predefined HTML inserts in posts

Post by rien »

It centralizes the maintenance of the external links.

Btw, it could also be used for other purposes, any time you reference something that is changeable you could use this mechanism.

Example: you have multiple posts referring to a person that is responsible for sales, like: "Please call Ed in sales" you would write "Please call [map]sales_contact[/map] in sales". Then when Ed finally leaves the company and is replaced by Bill, you would simply update the map and have "sales_contact" be replaced by "Bill" instead of "Ed". Your previous posts would then all read "Please contact Bill in sales" without you going through all messages to perform this change manually.

PS: In this example I assumed that the [html] bbcode in my first post would be [map]. I believe [map] is better because it more accurately describes the intent.

doktornotor
Registered User
Posts: 27
Joined: Wed Dec 21, 2011 5:34 pm

Re: [RFC] Predefined HTML inserts in posts

Post by doktornotor »

Still do not see why this cannot be dome with custom BBCodes in case you need this. (99.9% of boards do not.)

rien
Registered User
Posts: 4
Joined: Sat Jan 14, 2012 7:08 pm

Re: [RFC] Predefined HTML inserts in posts

Post by rien »

doktornotor wrote:Still do not see why this cannot be dome with custom BBCodes in case you need this. (99.9% of boards do not.)
Maybe its just me, but can you show me how this is done?

Edit: Maybe you intent to create a specific bbcode for every id?
That would work, but is hardly an elegant solution, and could extract a performance hit on normal postings if you have to manage hundreds of such ids.

User avatar
brunoais
Registered User
Posts: 964
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] Predefined HTML inserts in posts

Post by brunoais »

I believe this only makes sense to make as an extension.
Building something that almost no one wants in the basic package is a bad idea.

rien
Registered User
Posts: 4
Joined: Sat Jan 14, 2012 7:08 pm

Re: [RFC] Predefined HTML inserts in posts

Post by rien »

I have subcontracted this and received a most satisfying solution.
If anybody out there wants the same solution, please contact me at rien a-t overbeterleven dot nl

Post Reply