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

Keyword as prefix in title Empty Keyword as prefix in title

Post by Simone Boi November 28th 2020, 11:49 am

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"

Keyword as prefix in title TzP

i'll get more plates


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 : 90
Reputation : 2
Language : Italian

https://gamespledge.forumattivo.com/

Back to top Go down

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

Post by tikky November 28th 2020, 12:54 pm

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 : 923
Reputation : 160
Language : 🇵🇹

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

TonnyKamper and Simone Boi like this post

Back to top Go down

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

Post by Simone Boi November 28th 2020, 4:26 pm

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

Keyword as prefix in title Bgi8XJ7
avatar
Simone Boi
Forumember

Posts : 90
Reputation : 2
Language : Italian

https://gamespledge.forumattivo.com/

Back to top Go down

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

Post by skouliki November 28th 2020, 6:35 pm

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 : 15391
Reputation : 1709
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

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

Post by Ape November 28th 2020, 7:51 pm

@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


Keyword as prefix in title Left1212Keyword as prefix in title Center11Keyword as prefix in title Right112
Keyword as prefix in title Ape_b110
Keyword as prefix in title Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19437
Reputation : 2010
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