The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Keyword as prefix in title

4 posters

Go down

tutorial - Keyword as prefix in title Empty Keyword as prefix in title

Post by Simone Boi 28/11/2020, 13:49

Hi! First of all thanks for your help and tutorials, they're very helpful.
Now my question is:

I followed the tutorial to use keyword as prefix, the one to write #TUTORIAL and make it show as a plate, i can'd find the tutorial on this forum, but i'll try to explain myself if u can't understand.
Anyway, my problem with that system is that users can insert a title like this "#TUTORIAL #TUTORIAL #TUTORIAL how to blablabla" to have 3 plates and the title.

Like u see, if I manually add "#TUTORIAL"

tutorial - Keyword as prefix in title TzP

i'll get more plates


tutorial - Keyword as prefix in title TzJ

I wanna know how can limit the "plate option" to work only on the first "#", so the title in that case will be: "(plate) #TUTORIAL #TUTORIAL how to blablabla"

This is the code I used:

Javascript:

Code:
$(function() {
    var c = document.querySelectorAll('h2.topic-title, h1.page-title');
    for (i=0; i<c.length; i++) { 
      c[i].innerHTML = c[i].innerHTML.replace(/#TUTORIAL/g,'<span id="TUTORIAL">TUTORIAL</span>');
    }
});

and CSS:

Code:
#TUTORIAL {
  background: #FFF;
  padding: 0px 5px 1px 4px;
  border-radius: 6px !important;
  font-size: 11px;
  float: left;
  margin-right: 4px;
  border: 1px solid #CCC;
  box-shadow: 0px 1px 1px #FAFAFA;
}
avatar
Simone Boi
Forumember

Posts : 92
Reputation : 2
Language : Italian

https://gamespledge.forumattivo.com/

Back to top Go down

tutorial - Keyword as prefix in title Empty Re: Keyword as prefix in title

Post by tikky 28/11/2020, 14:54

Hello again @Simone Boi!

Read this tutorial: Topic prefix this code is better Embarassed and the prefix only work once per topic title
tikky
tikky
Forumember

Posts : 897
Reputation : 157
Language : 🇵🇹

https://www.forumotion.com/create-forum/modernbb

TonnyKamper and Simone Boi like this post

Back to top Go down

tutorial - Keyword as prefix in title Empty Re: Keyword as prefix in title

Post by Simone Boi 28/11/2020, 18:26

pedxz wrote:Hello again @Simone Boi!

Read this tutorial: Topic prefix this code is better Embarassed and the prefix only work once per topic title

Hi! Thanks for the tips, i could try that, but i was looking for a "scroll-choice", the tutorial u linked me is a little ugly, still helpful, but i don't know how to change to a scroll choice.

Anyway thanks again!

_____________________________________

And I have this bug with that

tutorial - Keyword as prefix in title Bgi8XJ7
avatar
Simone Boi
Forumember

Posts : 92
Reputation : 2
Language : Italian

https://gamespledge.forumattivo.com/

Back to top Go down

tutorial - Keyword as prefix in title Empty Re: Keyword as prefix in title

Post by skouliki 28/11/2020, 20:35

as i said already

Please do not open similar threads to multiple support forums.
Please read our forum rules: ESF General Rules

https://aiuto.forumattivo.it/t20562-problema-prefissi-topic-keyword

this topic will be locked
skouliki
skouliki
Manager
Manager

Female Posts : 15133
Reputation : 1696
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

tutorial - Keyword as prefix in title Empty Re: Keyword as prefix in title

Post by Ape 28/11/2020, 21:51

@Simone Boi This is your last warning you must NOT make the same topic / Thread on multiple forums you must only use one support forum for your help and support.

If you have a problem with this warning then please PM me.

Regards.

Ape


tutorial - Keyword as prefix in title Left1212tutorial - Keyword as prefix in title Center11tutorial - Keyword as prefix in title Right112
tutorial - Keyword as prefix in title Ape_b110
tutorial - Keyword as prefix in title Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19122
Reputation : 1993
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum