J0k3R^
  • *****


      Reputation : 11
      Registered on : 2014-04-25
      Posts : 153
      Love Fmcodes
    Hi, i want to make my categories got a "New" image when there are new posts after the last visit on the forum, like how last post link is working :)

    "New" on homepage categories Ub0UVO4

    i would like to have some similar to this:


    "New" on homepage categories NvP94pX

    or like fmcodes got :)

    "New" on homepage categories R9upAgi

    How can i do that? Im using punbb
    thanks :)

    Niko
    • Administrator

        Reputation : 320
        Registered on : 2012-02-22
        Posts : 2366
        School of codes courses: coming soon
      Hello,

      you just have to use an image for the icon "New forum" in ACP > Display > Images & Colors > Images



      Niko wants you in the team Guest

      Community manager and Administrator at Forumattivo.com

      J0k3R^
      • *****


          Reputation : 11
          Registered on : 2014-04-25
          Posts : 153
          Love Fmcodes
        I think its not what im exactly looking for  Roll Sweat
        I mean, i want a "new" icon over categories' image (like the image got) or next to the forum title (like here)

        Niko
        • Administrator

            Reputation : 320
            Registered on : 2012-02-22
            Posts : 2366
            School of codes courses: coming soon
          Can you provide me your forum link? thanks



          Niko wants you in the team Guest

          Community manager and Administrator at Forumattivo.com

          J0k3R^
          • *****


              Reputation : 11
              Registered on : 2014-04-25
              Posts : 153
              Love Fmcodes
            Its myplanet.forumgreek.com :)

            Niko
            • Administrator

                Reputation : 320
                Registered on : 2012-02-22
                Posts : 2366
                School of codes courses: coming soon
              Just a question.. now you don't have any new/old forum button/icon?



              Niko wants you in the team Guest

              Community manager and Administrator at Forumattivo.com

              J0k3R^
              • *****


                  Reputation : 11
                  Registered on : 2014-04-25
                  Posts : 153
                  Love Fmcodes
                I got a small button under last post (image at first post) but i dont mean to replace it, just to add an extra icon over categories' image or a text 'NEW' next to the forumtitle like here. I mean here u have both last post icon and 'new' right to forumtitle.. I think now i explained u clearly :)

                "New" on homepage categories 380S5Ws

                Niko
                • Administrator

                    Reputation : 320
                    Registered on : 2012-02-22
                    Posts : 2366
                    School of codes courses: coming soon
                  I got the issue, you didn't get my question...

                  normally forums have this icon:
                  "New" on homepage categories Salva12

                  did you remove it?



                  Niko wants you in the team Guest

                  Community manager and Administrator at Forumattivo.com

                  J0k3R^
                  • *****


                      Reputation : 11
                      Registered on : 2014-04-25
                      Posts : 153
                      Love Fmcodes
                    yes, now i got only the categories' image there.

                    effy
                    • Manager

                        Reputation : 7
                        Registered on : 2014-03-09
                        Posts : 55
                        Check out our new contest!
                      hello Jok3R^

                      I would suggest you to add again the forum icons (new posts in the forum, no new posts, closed forum) as it should be, and after that use this javascript code

                      Code:
                      $(document).ready(function(){$('img[src="NEWPOSTIMG"]').replaceWith('<span class="newintopic">New</span>')});

                      replace NEWPOSTIMG with the link of the image that should be on your forum if there a new posts in a forum (as in the screenshot niko posted you) and then customize it with CSS :fior:



                      Welcome on fmcodes
                      J0k3R^
                      • *****


                          Reputation : 11
                          Registered on : 2014-04-25
                          Posts : 153
                          Love Fmcodes
                        hi,
                        thanks for the reply.
                        is there other way to make this? because i dont really like to have icons on my homepage :)

                        effy
                        • Manager

                            Reputation : 7
                            Registered on : 2014-03-09
                            Posts : 55
                            Check out our new contest!
                          Hello

                          Do the steps I told you and that code will replace the normal icon with text, that you can customize and move after the installation

                          :fior:



                          Welcome on fmcodes
                          J0k3R^
                          • *****


                              Reputation : 11
                              Registered on : 2014-04-25
                              Posts : 153
                              Love Fmcodes
                            i understood but if i dont have new replies? the icon will be there?

                            u think it will work if for 'no new posts' add this?

                            $(document).ready(function(){$('img[src="NONEWPOSTIMG"]').replaceWith('https://2img.net/i/fa/empty.gif" />')});

                            Anonymous
                            • Guest

                                Hello J0k3R^!
                                As you're using PunBB, this can be done very easily. If you want to add "New" after the forum title, you can do this:
                                1. Edit the "index_box" template. Find
                                Code:
                                <h{catrow.forumrow.LEVEL} class="hierarchy"><a href="{catrow.forumrow.U_VIEWFORUM}" class="forumtitle">{catrow.forumrow.FORUM_NAME}</a></h{catrow.forumrow.LEVEL}>
                                and replace it with
                                Code:
                                <h{catrow.forumrow.LEVEL} class="hierarchy"><a href="{catrow.forumrow.U_VIEWFORUM}" class="forumtitle">{catrow.forumrow.FORUM_NAME}</a> &nbsp;<img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></h{catrow.forumrow.LEVEL}>
                                . Then publish the template.

                                2. In Pics management > Advanced > Icons for the forums, put this image (https://2img.net/i/fa/empty.gif) for everything else except "Category - New" and "Forum - New". For "Category - New" and "Forum - New", put this image (https://i.servimg.com/u/f58/17/19/90/23/empty10.gif).

                                3. In Javascript codes management, simply add this script:
                                Code:
                                $(document).ready(function()
                                {$('img[src="http://i58.servimg.com/u/f58/17/19/90/23/empty10.gif"]').replaceWith('<span class="newpostprefix">New</span>');});

                                4. Customize the css of the class ".newpostprefix" as you want.

                                That should be it. :)

                                J0k3R^
                                • *****


                                    Reputation : 11
                                    Registered on : 2014-04-25
                                    Posts : 153
                                    Love Fmcodes
                                  Hi Mathias and thanks for ur reply.
                                  i actually dont have a similar code in my index_box could u check it?
                                  here it is:

                                  Code:
                                  <div class="pun-crumbs">
                                    <p class="crumbs"><a href="{U_INDEX}">MyPlanet Forum</a><strong>{NAV_CAT_DESC}</strong></p>
                                  </div>
                                  <div class="main">
                                  <!-- BEGIN catrow -->
                                    <!-- BEGIN tablehead -->
                                          <div class="contcolor"><div class="main-head">
                                          <div class="page-title">{catrow.tablehead.L_FORUM}</div>
                                        </div>
                                        <div class="main-content">
                                          <div class="ipsBox">
                                          <table cellspacing="0" class="table">
                                              <thead>
                                                <tr>
                                                  <th nowrap="nowrap" width="550"><div style="width:250px;"><i>Δημόσια Συζήτηση</i></div></th>
                                                  <th nowrap="nowrap" width="165"><div style="width:200px;"><i>Θέματα</i></div></th>
                                                                            <th nowrap="nowrap" width="162"><div style="width:130px;"><i>Τελευταία Απάντηση</i></div></th>
                                                </tr>
                                              </thead>
                                              <tbody class="statused">
                                    <!-- END tablehead -->

                                    <!-- BEGIN forumrow -->
                                                <tr>
                                                              <td>
                                              <a href="{catrow.forumrow.U_VIEWFORUM}" class=
                                                                                              "forumtitle"><font size="2" face="Verdana"><b>{catrow.forumrow.FORUM_NAME}</b></font></a>
                                                          <br />
                                                          <div class="descript"><div class="plaisiocat">
                                                            {catrow.forumrow.FORUM_DESC}
                                                            </div></div>
                                                      <!-- BEGIN switch_moderators_links -->
                                                      <br />
                                                      {catrow.forumrow.switch_moderators_links.L_MODERATOR}{catrow.forumrow.switch_moderators_links.MODERATORS}
                                                      <!-- END switch_moderators_links -->
                                                              <ul class="subforums">{catrow.forumrow.L_LINKS}{catrow.forumrow.LINKS}</ul>
                                                      <strong>{forumrow.L_SUBFORUM_STR}</strong> {forumrow.SUBFORUMS}
                                                    </td>
                                                                                <td class="tc2" align="center" valign="middle" height="50" width="50">
                                                                                  <font size="2" face="Verdana"><span class="gensmallhome1"><b> {catrow.forumrow.TOPICS}</b> Θέματα </span><br /><br /><span class="gensmallhome2"><b> {catrow.forumrow.POSTS}</b> Απαντήσεις&nbsp;</span></font>
                                          </td>
                                                    <td class="tcr">
                                                      <span>
                                                      <!-- BEGIN switch_topic_title -->
                                                        <a href="{catrow.forumrow.U_LATEST_TOPIC}" title="{catrow.forumrow.LATEST_TOPIC_TITLE}">{catrow.forumrow.LATEST_TOPIC_NAME}</a><br />
                                                      <!-- END switch_topic_title -->
                                                      {catrow.forumrow.USER_LAST_POST}
                                                      </span>
                                                      </td>
                                                </tr>
                                    <!-- END forumrow -->

                                    <!-- BEGIN tablefoot -->
                                              </tbody>
                                          </table>
                                          </div>
                                                        </div></div>
                                    <!-- END tablefoot -->
                                  <!-- END catrow -->
                                  </div>

                                  <!-- BEGIN switch_on_index -->
                                    <!-- BEGIN switch_delete_cookies -->
                                    <!-- END switch_delete_cookies -->
                                  <!-- END switch_on_index -->

                                  Thanks  :fior:

                                  Anonymous
                                  • Guest

                                      After
                                      Code:
                                       <a href="{catrow.forumrow.U_VIEWFORUM}" class=
                                       
                                                                                                
                                      "forumtitle"><font size="2"
                                      face="Verdana"><b>{catrow.forumrow.FORUM_NAME}</b></font></a>
                                      paste in this:
                                      Code:
                                       &nbsp;<img title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></h{catrow.forumrow.LEVEL}>

                                      J0k3R^
                                      • *****


                                          Reputation : 11
                                          Registered on : 2014-04-25
                                          Posts : 153
                                          Love Fmcodes
                                        this is solved, thank u so much, really!! :)