SocialAcademy • Forum

Social Academy Community Support Forum & Free Tutorial's & Skins



SocialAcademy • Forum » Support Section » Ask Question 's & Problems » Solved & Trash Files  →   [Solved] Adding more than 1 topic Prefix

[Solved] Adding more than 1 topic Prefix


    • Please log in to Reply

    View previous topic View next topic Go down  Message [Page 1 of 1]

    #1

    OfflineUdarsha45

    Udarsha45
     
    Advance Member
    Advance Member

    Posted Sat Aug 09, 2014 12:45 pm

     
    Details: Hello,

    Thanks to this topic, I was successful to add topic prefixes. https://socialacademy.forumotion.com/t107-solved-tags-prefixes-for-topics However it only limits me to only add 1 prefix. If I want to add multiply prefixes how should I should add the JavaScript and the CSS?
    Forum Address:http://www.bleachstory.net/
    Forum Version: PunBB

    #2

    OfflineDustin

    Dustin
     
    Forum Helper
    Forum Helper

    Posted Sun Aug 10, 2014 12:38 am

     
    You're going to change the symbol ✔ to whatever you want (example: ~ but it doesn't have to be a symbol), and the id perfix to something different for the CSS. Then create a new javascript with your modifications and for the CSS change #perfix to whatever word you chose. (example: #prefix2)

    #3

    OfflineUdarsha45

    Udarsha45
     
    Advance Member
    Advance Member

    Posted Sun Aug 10, 2014 4:46 am

     
    Is this how it should be?

    JavaScript Code:

    Code:
    jQuery(document).ready(function(){jQuery(".module a, .topiclist, .page-title, .statused").each(function(){jQuery(this).html(jQuery(this).html().replace(/[OPEN]/g,'<span id=\'perfix\'>OPEN</span>'))})});

    CSS Code:

    Code:
    #perfix2 {
                background: url('http://i57.servimg.com/u/f57/17/68/86/50/highli10.png') repeat-x scroll 0px -1px #8F0E0E;
                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;
    }
           
             

    #4

    OfflineDustin

    Dustin
     
    Forum Helper
    Forum Helper

    Posted Sun Aug 10, 2014 5:19 am

     
    Almost.

    In the javascript code, change perfix to perfix2 since that's in your CSS now.

    Here's the modified code..

    Code:
    jQuery(document).ready(function(){jQuery(".module a, .topiclist, .page-title, .statused").each(function(){jQuery(this).html(jQuery(this).html().replace(/[OPEN]/g,'<span id=\'perfix2\'>OPEN</span>'))})});

    #5

    OfflineUdarsha45

    Udarsha45
     
    Advance Member
    Advance Member

    Posted Sun Aug 10, 2014 10:43 am

     
    Thank you very much! :D

    Solved.

    #6

    OfflineDustin

    Dustin
     
    Forum Helper
    Forum Helper

    Posted Tue Aug 12, 2014 1:44 am

     
    You're welcome.

    Topic solved & locked.

    #7

    OfflineSponsored content


     

    Posted

     

    Message (Page 1 of 1)



      Share Topics Url

      Url
      BBcode
      HTML

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

       
      • Free forum | ©phpBB | Free forum support | Report an abuse | Forumotion.com


      Social Academy Forum
      © Social Academy 2013-2022