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.

Topic Prefix problem

4 posters

Go down

Topic Prefix problem Empty Topic Prefix problem

Post by erchima May 28th 2014, 9:20 am

erchima
erchima
Forumember

Female Posts : 629
Reputation : 15
Language : INDONESIAN | Lua Script | Visual Basic | and Coding
Location : Under your bed xD

http://erchimacute.forumid.net

Back to top Go down

Topic Prefix problem Empty Re: Topic Prefix problem

Post by Guest May 28th 2014, 9:52 am

Is this your forum? http://erchimacute.forumid.net/
Try putting again the codes, afterwards, create a topic. Allow me to check the problem.
avatar
Guest
Guest


Back to top Go down

Topic Prefix problem Empty Re: Topic Prefix problem

Post by erchima May 30th 2014, 8:39 am

still not work :/
erchima
erchima
Forumember

Female Posts : 629
Reputation : 15
Language : INDONESIAN | Lua Script | Visual Basic | and Coding
Location : Under your bed xD

http://erchimacute.forumid.net

Back to top Go down

Topic Prefix problem Empty Re: Topic Prefix problem

Post by SocialAcademy May 30th 2014, 9:33 am

Hello @Erchima did you follow this ?


Topic Prefix problem S110

click the link - > Post # 2
SocialAcademy
SocialAcademy
Forumember

Male Posts : 145
Reputation : 11
Language : JavaScript, CSS, Html, JQuery, C#, C++, Php, Python
Location : Forumotion

http://www.socialacademy.biz

Back to top Go down

Topic Prefix problem Empty Re: Topic Prefix problem

Post by erchima May 30th 2014, 4:17 pm

yes, but doesn't work
erchima
erchima
Forumember

Female Posts : 629
Reputation : 15
Language : INDONESIAN | Lua Script | Visual Basic | and Coding
Location : Under your bed xD

http://erchimacute.forumid.net

Back to top Go down

Topic Prefix problem Empty Re: Topic Prefix problem

Post by Van-Helsing May 31st 2014, 12:38 am

Hello Erchima,
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
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Topic Prefix problem Empty Re: Topic Prefix problem

Post by erchima May 31st 2014, 12:57 pm

ID for topic work but style for ID doesn't work
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>'))})})
CSS
Code:

.error {
background: url('http://i57.servimg.com/u/f57/17/68/86/50/highli10.png') repeat-x scroll 0px -1px #008000;}
erchima
erchima
Forumember

Female Posts : 629
Reputation : 15
Language : INDONESIAN | Lua Script | Visual Basic | and Coding
Location : Under your bed xD

http://erchimacute.forumid.net

Back to top Go down

Topic Prefix problem Empty Re: Topic Prefix problem

Post by Van-Helsing May 31st 2014, 2:07 pm

Try this js:
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.
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Topic Prefix problem Empty Re: Topic Prefix problem

Post by BrennanSupport May 31st 2014, 9:23 pm

Hello try using this code I set for important already:

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:
Topic Prefix problem Impo10

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  cheers
avatar
BrennanSupport
Forumember

Male Posts : 31
Reputation : 2
Language : English

http://officialssforum.com

Back to top Go down

Back to top

- Similar topics

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