Topic Prefix problem
4 posters
Page 1 of 1
Topic Prefix problem
hello, i have follow the tutorial
but still not work
- http://www.fmcodes.com/t930-add-prefixes-for-your-topics-list
- http://socialacademy.forums.fm/t107-solved-tags-prefixes-for-topics
but still not work
Re: Topic Prefix problem
Is this your forum? http://erchimacute.forumid.net/
Try putting again the codes, afterwards, create a topic. Allow me to check the problem.
Try putting again the codes, afterwards, create a topic. Allow me to check the problem.
Guest- Guest
Re: Topic Prefix problem
Hello Erchima,
You must make a new javascript and add the following code:
Then you must add a css for this element:
For each time which you want you must add in the same javascript the below code and change the element "Problem1" into which one you want. After that you must create a new CSS with the new element which you added in the javascript. By this way you can have the number of prefixes that you want.
With Best Regards,
Dark-Avenger
You must make a new javascript and add the following code:
- Code:
jQuery(document).ready(function(){jQuery(".module a, .topiclist, .page-title, .statused").each(function(){jQuery(this).html(jQuery(this).html().replace(/Problem1/g,'<span id=\'Problem1\'>Problem</span>'))})})
Then you must add a css for this element:
- Code:
#problem1 {
background: none repeat scroll 0px 0px rgb(123, 166, 13);
border-radius: 4px 4px 4px 4px;
color: rgb(255, 255, 255);
display: inline-block;
font-size: 9px;
font-weight: 700;
height: 15px;
line-height: 15px;
padding: 0px 5px;
text-transform: uppercase;
vertical-align: middle;
}
For each time which you want you must add in the same javascript the below code and change the element "Problem1" into which one you want. After that you must create a new CSS with the new element which you added in the javascript. By this way you can have the number of prefixes that you want.
With Best Regards,
Dark-Avenger
Re: Topic Prefix problem
ID for topic work but style for ID doesn't work
http://erchimacute.forumid.net/f1-one-information
My Code
JS
http://erchimacute.forumid.net/f1-one-information
My Code
JS
- Code:
jQuery(document).ready(function(){jQuery(".module a, .topiclist, .page-title, .statused").each(function(){jQuery(this).html(jQuery(this).html().replace(/error/g,'<span id=\'error\'>ERROR</span>'))})})
- Code:
.error {
background: url('http://i57.servimg.com/u/f57/17/68/86/50/highli10.png') repeat-x scroll 0px -1px #008000;}
Re: Topic Prefix problem
Try this js:
Check in the topics
and change the prefix1, prefix2, prefix2 prefixX in which you wish.
Check in the topics
- Code:
var prefixes = ["prefix1","prefix2","prefix3","prefix4"];
var _pm = false;
var chk = false;
function toMenu(a) {
var htmlpre = '<select style="margin-right:5px" id="<b style="color:#aa0000" class="coloradmin">prefix</b>" size="1"><option value="">(None)</option>';
for (i in a)
htmlpre += '<option value="' + a[i] + '">' + a[i] + '</option>';
htmlpre += '</select>';
return htmlpre;
}
function checkpre(ar, input) {
for (i in ar) {
var p = new RegExp("\\" + ar[i], "g");
var title = input.substr(0, input.indexOf(']'));
if (p.test(title)) return ar[i];
}
return "";
}
$(function () {
if (_pm) chk = /\privmsg/.test(location.href);
if (/\/post/.test(location.href) || chk) {
$(toMenu(prefixes)).insertBefore("input[name=subject][type=text]");
var mw = $("#<b style="color:#aa0000" class="coloradmin">prefix</b>").width() + 5;
$("input[name=subject]").css("width", $("input[name=subject]").width() - mw);
var t = $("[name=subject]").val();
var cur = checkpre(prefixes, t);
if (cur != "") {
$("[value=" + cur + "]").attr("selected", "selected");
$("input[name=subject]").val(t.replace('[' + cur + ']', '').trim());
}
$("input[name=post]").click(function () {
var sub = $("input[name=subject]").val().trim();
if (sub != "" && $("#<b style="color:#aa0000" class="coloradmin">prefix</b>").val() != "")
$("input[name=subject]").val("[" + $("#<b style="color:#aa0000" class="coloradmin">prefix</b>").val() + "] " + sub);
});
}
});
and change the prefix1, prefix2, prefix2 prefixX in which you wish.
Re: Topic Prefix problem
Hello try using this code I set for important already:
JS:
CSS:
How it would look:
Look at the javascript code and find the check mark, aswell where I put Important, you may change that to anything you wish to e.g: Solved, Pro, Admin ect.
You may also change the colors in the CSS code:
Now finally, when making the post be sure in the title to put it as (example): ✔ (or whatever you replaced the check with) Hello guys
Enjoy
JS:
- Code:
jQuery(document).ready(function(){jQuery(".module a, .topiclist, .page-title, .statused").each(function(){jQuery(this).html(jQuery(this).html().replace(/✔/g,'<span id=\'resol_d\'>Important</span>'))})});
CSS:
- Code:
#resol_d {
background: none repeat scroll 0px 0px rgb(252, 218, 63);
border-radius: 4px 4px 4px 4px;
color: rgb(255, 255, 255);
display: inline-block;
font-size: 9px;
font-weight: 700;
height: 15px;
line-height: 15px;
padding: 0px 5px;
text-transform: uppercase;
vertical-align: middle;
}
How it would look:
Look at the javascript code and find the check mark, aswell where I put Important, you may change that to anything you wish to e.g: Solved, Pro, Admin ect.
You may also change the colors in the CSS code:
- Code:
background: none repeat scroll 0px 0px rgb(252, 218, 63);
Now finally, when making the post be sure in the title to put it as (example): ✔ (or whatever you replaced the check with) Hello guys
Enjoy
Similar topics
» Topic prefix problem
» Topic prefix
» Help please with topic prefix!
» Topic Prefix
» Topic Prefix Help, Please?
» Topic prefix
» Help please with topic prefix!
» Topic Prefix
» Topic Prefix Help, Please?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum