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.
The forum of the forums
5 posters

    [Tutorial] Show the first post reminder in specific topics

    Wecoc
    Wecoc
    Forumember


    Male Posts : 144
    Reputation : 111
    Language : Catalan, Spanish, English

    [Tutorial] Show the first post reminder in specific topics Empty [Tutorial] Show the first post reminder in specific topics

    Post by Wecoc March 18th 2018, 3:16 am

    With this trick you will be able to show the first post reminder in only specific topics.
    It works in phpBB3, punBB, Invision and modernBB.
    It doesn't work in phpBB2.

    Instructions


    1) Enable the first post option.

    To do that you have to go to:
    General ï…¸ Configuration ï…¸ Messages ï…¸ Always show the first post in the topics ï…¸ Yes

    2) Open the template viewtopic_body

    Display ï…¸ Templates ï…¸ General ï…¸ viewtopic_body

    phpBB3 and modernBB:

    punBB:

    Invision:

    3) Add this in your CSS

    Display ï…¸ Colors ï…¸ CSS Stylesheet

    Code:
    /* Hide first post reminder (default) */
    .first_post, #first-post-br { display: none }


    4) Insert the Javascript

    Modules ï…¸ Javascript codes management ï…¸ Create a new Javascript

    Make sure you have Javascript Codes enabled.

    Name: First post toggle
    Placement: In all the pages

    Code:
    $(function() {
      $('.first_post').filter(function(){
        var e = $(this);
        if (e.html().indexOf("<!--first_post-->")) {
          var post = e[0];
          var br = post.nextElementSibling;
          post.style.display = "block";
          br.style.display = "block";
        }
      });
    });

    How to use it


    The first post will not be displayed by default in other pages.
    To display it you have to add
    Code:
    <!--first_post-->
    on its content. Don't worry, that will not be shown in the post itself.

    [Tutorial] Show the first post reminder in specific topics First_10

    Extra:

    And that's all. Hope you find it useful Wink
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    [Tutorial] Show the first post reminder in specific topics Empty Re: [Tutorial] Show the first post reminder in specific topics

    Post by TheCrow March 18th 2018, 10:14 am

    And what does this do? Do we have an image to see the result?



    [Tutorial] Show the first post reminder in specific topics Thecro10
     Forum of the Forums

    Forumotion Rules | Tips & Tricks |
    FAQ | Did you forget your password?



    *** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
    No support via PM!
    Wecoc
    Wecoc
    Forumember


    Male Posts : 144
    Reputation : 111
    Language : Catalan, Spanish, English

    [Tutorial] Show the first post reminder in specific topics Empty Re: [Tutorial] Show the first post reminder in specific topics

    Post by Wecoc March 18th 2018, 3:10 pm

    Well, it's difficult to show the result with an image in this case, but let's see...

    Spoiler:

    I used the same principle as in the tutorial Hide the sentence "Last edited by..." on specific or all messages. Also, now the first post reminder has a specific class called first_post, so you could modify some properties of it via CSS.

    Spoiler:
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51554
    Reputation : 3523
    Language : English
    Location : United States

    [Tutorial] Show the first post reminder in specific topics Empty Re: [Tutorial] Show the first post reminder in specific topics

    Post by SLGray March 19th 2018, 1:18 am

    So if you do not want to use the first reminder feature in the AP, you can use this one for certain topics?



    [Tutorial] Show the first post reminder in specific topics Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    Wecoc
    Wecoc
    Forumember


    Male Posts : 144
    Reputation : 111
    Language : Catalan, Spanish, English

    [Tutorial] Show the first post reminder in specific topics Empty Re: [Tutorial] Show the first post reminder in specific topics

    Post by Wecoc March 19th 2018, 1:29 am

    Long story short, this uses the first reminder feature in the AP but "hides" it by default except for certain topics.
    Sorry if I didn't explain it well enough the first time.
    azwiz
    azwiz
    Forumember


    Male Posts : 837
    Reputation : 9
    Language : english
    Location : Apache Junction , Arizona USA

    [Tutorial] Show the first post reminder in specific topics Empty Re: [Tutorial] Show the first post reminder in specific topics

    Post by azwiz July 3rd 2020, 1:59 am

    How do I disable the first topic reminder ? I think it is causing some issues . I do not like it anyway . I think I have version phpBB .
    skouliki wrote:
    azwiz wrote:How do I disable the first topic reminder ? I think it is causing some issues . I do not like it anyway . I think I have version phpBB .

    Administration Panel .... General .. Messages and emails ... Configuration
    Always show the first post in the topics : No
    Okay I have turned it off .
    Thank you .
    If you have not seen my current support post . Please view it at
    https://help.forumotion.com/t159228-how-to-fix-this-coding-problem#1108929

    Maybe you can help figure it out .

    Thank you .


    Last edited by azwiz on July 3rd 2020, 9:41 pm; edited 1 time in total
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15391
    Reputation : 1709
    Language : English,Greek
    Location : Greece

    [Tutorial] Show the first post reminder in specific topics Empty Re: [Tutorial] Show the first post reminder in specific topics

    Post by skouliki July 3rd 2020, 9:21 pm

    azwiz wrote:How do I disable the first topic reminder ? I think it is causing some issues . I do not like it anyway . I think I have version phpBB .

    Administration Panel .... General .. Messages and emails ... Configuration
    Always show the first post in the topics : No

    Wecoc likes this post


      Current date/time is November 11th 2024, 7:33 pm