Current date/time is April 27th 2024, 2:59 am

Search found 5 matches for Text

Keyword problem not working..

skouliki wrote:
jomarcabasag wrote:
SLGray wrote:Do you have topic titles that have EMI?

Nope .
How to work that?


he means EHI

with this tutorial, you are able to highlight specific words in your topic titles
if you dont have topic titles with the word EHI then no keywords will be showed up

the reason you changed the word #Text to #EHI must be cause you have topic titles with this word

Ok thanks @Skouliki Solved. Sad
by jomarcabasag
on September 11th 2017, 1:43 pm
 
Search in: Garbage
Topic: Keyword problem not working..
Replies: 18
Views: 1089

Keyword problem not working..

jomarcabasag wrote:
SLGray wrote:Do you have topic titles that have EMI?

Nope .
How to work that?


he means EHI

with this tutorial, you are able to highlight specific words in your topic titles
if you dont have topic titles with the word EHI then no keywords will be showed up

the reason you changed the word #Text to #EHI must be cause you have topic titles with this word
by skouliki
on September 11th 2017, 12:59 pm
 
Search in: Garbage
Topic: Keyword problem not working..
Replies: 18
Views: 1089

Keyword problem not working..

skouliki wrote:did you follow the instructions below ?

#TEXT: replace this TEXT with the word you want to transform (but do not remove the # before it, or the css code won't style your word)

4. Modifications
In the javascript code you have this line:

.innerHTML.replace(/#TEXT/g,'<span id="TEXT">TEXT</span>');




  • #TEXT: this is the first TEXT you find. You have to replace it with the word you want to change
    Note: It is important that the word you replace here is the SAME written in the title;
    this part is CASE sensitive, so if you have Hello in the title and you write hello the code won't work

  • TEXT: the second TEXT you find. It is the ID used to style your keyword, if you have multiple keyword styles change it to the ID you want.
  • TEXT: the third TEXT you find. Replace it with the word you want to change



Yes I follow it but...Not working. I change the #Text to #EHI . But I don't know how to work it.. what I put in the title to work?
Sorry for my bad English.,
by jomarcabasag
on September 11th 2017, 10:14 am
 
Search in: Garbage
Topic: Keyword problem not working..
Replies: 18
Views: 1089

Keyword problem not working..

did you follow the instructions below ?

#TEXT: replace this TEXT with the word you want to transform (but do not remove the # before it, or the css code won't style your word)

4. Modifications
In the javascript code you have this line:

.innerHTML.replace(/#TEXT/g,'<span id="TEXT">TEXT</span>');




  • #TEXT: this is the first TEXT you find. You have to replace it with the word you want to change
    Note: It is important that the word you replace here is the SAME written in the title;
    this part is CASE sensitive, so if you have Hello in the title and you write hello the code won't work

  • TEXT: the second TEXT you find. It is the ID used to style your keyword, if you have multiple keyword styles change it to the ID you want.
  • TEXT: the third TEXT you find. Replace it with the word you want to change

by skouliki
on September 11th 2017, 10:02 am
 
Search in: Garbage
Topic: Keyword problem not working..
Replies: 18
Views: 1089

Style topic title "Keywords"

Style topic title "Keywords"



1. Definition
Thanks to this tutorial, you will now be able to highlight specific words (let's call this "keywords") in your topic title. Just like the example shown below :

Topics tagged under text on The forum of the forums Sa10


2. The JavaScript code
To add the JavaScript, please follow the steps below :

ACP Topics tagged under text on The forum of the forums Arrow10Modules Topics tagged under text on The forum of the forums Arrow10HTML & Javascript Topics tagged under text on The forum of the forums Arrow10Javascript code management



Make sure javascript codes management is set to 'yes'

then create a new javascript code Topics tagged under text on The forum of the forums 29877


Note: You have to choose the javascript code that corresponds to your forum version Topics tagged under text on The forum of the forums Icon_thumright

PhpBB3
Title: Your choice
Placement: In the topics
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(/#TEXT/g,'<span id="TEXT">TEXT</span>');
    }
});



Invision
Title: Your choice
Placement: In the topics
Code:
$(function() {
    var c = document.querySelectorAll('.postdetails h3');
    for (i=0; i<c.length; i++) {    
      c[i].innerHTML = c[i].innerHTML.replace(/#TEXT/g,'<span id="TEXT">TEXT</span>');
    }
});



PunBB
Title: Your choice
Placement: In the topics
Code:
$(function() {
    var c = document.querySelectorAll('.posthead');
    for (i=0; i<c.length; i++) {    
      c[i].innerHTML = c[i].innerHTML.replace(/#TEXT/g,'<span id="TEXT">TEXT</span>');
    }
});




3. The style
Please go to the following page :

ACP Topics tagged under text on The forum of the forums Arrow10Display Topics tagged under text on The forum of the forums Arrow10Images & Colors Topics tagged under text on The forum of the forums Arrow10Colors Topics tagged under text on The forum of the forums Arrow10CSS stylesheet



and add the following code to your CSS stylesheet :
Code:
#TEXT {
  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;
}



#TEXT: replace this TEXT with the word you want to transform (but do not remove the # before it, or the css code won't style your word)

4. Modifications
In the javascript code you have this line:
.innerHTML.replace(/#TEXT/g,'<span id="TEXT">TEXT</span>');




  • #TEXT: this is the first TEXT you find. You have to replace it with the word you want to change
    Note: It is important that the word you replace here is the SAME written in the title;
    this part is CASE sensitive, so if you have Hello in the title and you write hello the code won't work

  • TEXT: the second TEXT you find. It is the ID used to style your keyword, if you have multiple keyword styles change it to the ID you want.
  • TEXT: the third TEXT you find. Replace it with the word you want to change


You can style multiple keywords by adding another replace method after the first one :
Code:
.innerHTML.replace(/#TEXT/g,'<span id="TEXT">TEXT</span>').replace(/\[TEST\]/g,'<span id="TEST">Test</span>');



Exclamation Attention :
There are some special characters that must be Escaped to be replaced as a keyword.

Brackets must be written as :
\[ and \]

Parenthesis must be written as :
\( and \)

If your keyword is not being replaced use the escape character \ before newly added characters.


by Ange Tuteur
on June 23rd 2014, 1:57 pm
 
Search in: Tips & Tricks
Topic: Style topic title "Keywords"
Replies: 0
Views: 7043

Back to top

Jump to: