Members: 182  ?  Posts: 8753  ?  Topics: 744  ?  Please welcome -SyN-, our newest member.
Please login or register.

Login with username, password and session length
 

News:

Welcome To Graphics Mayhem

collapse

Author Topic: Help with Themes, etc.  (Read 350 times)

0 Members and 1 Guest are viewing this topic.

plusev

  • Proficient
  • Offline
  • Posts: 116
  • OS:
  • Windows XP
  • Browser:
  • MS Internet Explorer 7.0
Help with Themes, etc.
« on: July 28, 2009, 04:45:05 PM »
    Okay just done it for ya so just play until you get it as you want

    Find in display.template.php

    Code: [Select]
    // Show the page index... "Pages: [1]".
    echo '


    ', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '   ' . $txt['go_down'] . '' : '', '


    ';


    Replace

    Code: [Select]
    // Show the page index... "Pages: [1]".
    echo '

    ', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '   ' . $txt['go_down'] . '' : '', '


    ';


    and find

    Code: [Select]
    echo '

    ', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '   ' . $txt['go_up'] . '' : '', '


    ', $context['previous_next'], '

    ';

    and replace with

    Code: [Select]
    echo '

    ', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '   ' . $txt['go_up'] . '' : '', '



    ';


    give it a try

    Shortie

    Oh and as always backup first :D:D

    [ ERROR: SPECIFIED ATTACHMENT MISSING ]

    Hey Shortie,

    Question - will the Prev/next apply to the posts in a topic or the topics in a category? I was looking for posts in a topic.

    +EV

    Shortie

    • Administrator
    • Expert
    • Offline
    • Posts: 2556
    • The Ultimate Boss
    • OS:
    • Windows 7/Server 2008 R2
    • Browser:
    • Firefox 3.5.1
    Help with Themes, etc.
    « Reply #1 on: July 28, 2009, 05:09:01 PM »
      Hi Ya

      It Applies to posts in a topic - from what I can see there is no function for doing Prev / Next in a Board with a large number of topics

      So at a guess it is what you are after - try it and if it is not what you want then over write the file with the backup you will make before you start :D:D:D

      If that makes sense

      Shortie
      Thank You, "Guest" For Reading My Post.

      plusev

      • Proficient
      • Offline
      • Posts: 116
      • OS:
      • Windows XP
      • Browser:
      • MS Internet Explorer 7.0
      Help with Themes, etc.
      « Reply #2 on: July 28, 2009, 05:49:03 PM »
        Backups?? Backups are for amatuers! LOL

        Shortie

        • Administrator
        • Expert
        • Offline
        • Posts: 2556
        • The Ultimate Boss
        • OS:
        • Windows 7/Server 2008 R2
        • Browser:
        • Firefox 3.5.1
        Help with Themes, etc.
        « Reply #3 on: July 28, 2009, 05:52:44 PM »
          LoL

          May have to remind you of that one day  >:D>:D>:D
          Thank You, "Guest" For Reading My Post.

          plusev

          • Proficient
          • Offline
          • Posts: 116
          • OS:
          • Windows XP
          • Browser:
          • MS Internet Explorer 7.0
          Help with Themes, etc.
          « Reply #4 on: July 29, 2009, 02:30:14 PM »
            LoL

            May have to remind you of that one day  >:D>:D>:D

            Yah, eating crow sux ;D

            The edit worked fine. Don't want to be a nit but can the prev/next be moved between the pages and the go up/down instead of on the extreme left?

            Thx, +EV

            Shortie

            • Administrator
            • Expert
            • Offline
            • Posts: 2556
            • The Ultimate Boss
            • OS:
            • Windows 7/Server 2008 R2
            • Browser:
            • Firefox 3.5.1
            Help with Themes, etc.
            « Reply #5 on: July 29, 2009, 03:03:29 PM »
              Will do

              pop back later
              Thank You, "Guest" For Reading My Post.

              Shortie

              • Administrator
              • Expert
              • Offline
              • Posts: 2556
              • The Ultimate Boss
              • OS:
              • Windows 7/Server 2008 R2
              • Browser:
              • Firefox 3.5.1
              Help with Themes, etc.
              « Reply #6 on: July 29, 2009, 04:19:31 PM »
                Okay here we are

                First edit circa line 130

                Code: [Select]
                   // Show the page index... "Pages: [1]".
                   echo '
                   
                   
                ', $txt['pages'], ': ', $context['page_index'], '  ', $context['previous_next'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '   ' . $txt['go_down'] . '' : '', '

                   
                ';


                Second edit circa line 520

                Code: [Select]
                   echo '

                   
                ', $txt['pages'], ': ', $context['page_index'],'  ', $context['previous_next'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '   ' . $txt['go_up'] . '' : '', '

                   
                   

                ';


                Shortie

                Thank You, "Guest" For Reading My Post.

                plusev

                • Proficient
                • Offline
                • Posts: 116
                • OS:
                • Windows XP
                • Browser:
                • MS Internet Explorer 7.0
                Help with Themes, etc.
                « Reply #7 on: July 29, 2009, 04:44:31 PM »
                  Okay here we are

                  First edit circa line 130

                  Code: [Select]
                     // Show the page index... "Pages: [1]".
                     echo '
                     
                     
                  ', $txt['pages'], ': ', $context['page_index'], '  ', $context['previous_next'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '   ' . $txt['go_down'] . '' : '', '

                     
                  ';


                  Second edit circa line 520

                  Code: [Select]
                     echo '

                     
                  ', $txt['pages'], ': ', $context['page_index'],'  ', $context['previous_next'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '   ' . $txt['go_up'] . '' : '', '

                     
                     

                  ';


                  Shortie

                  [ ERROR: SPECIFIED ATTACHMENT MISSING ]

                  The position moved fine but the prev/next is now rotating thru the topics not the posts??

                  Shortie

                  • Administrator
                  • Expert
                  • Offline
                  • Posts: 2556
                  • The Ultimate Boss
                  • OS:
                  • Windows 7/Server 2008 R2
                  • Browser:
                  • Firefox 3.5.1
                  Help with Themes, etc.
                  « Reply #8 on: July 29, 2009, 04:57:13 PM »
                    Opss

                    It has done that since day one - I should test more but have been flat out recently

                    Will see what I can do but can't promise at the moment - maybe SoLo or someone could jump in

                    Shortie
                    Thank You, "Guest" For Reading My Post.

                    SoLoGHoST

                    • SoLoGHoSt
                    • Connoisseur
                    • Offline
                    • Posts: 1709
                    • SMF MOD Expert!
                    • OS:
                    • Windows Vista/Server 2008
                    • Browser:
                    • MS Internet Explorer 8.0
                    Re: Help with Themes, etc.
                    « Reply #9 on: July 29, 2009, 10:15:32 PM »
                      Sure, would love to Jump In, just attach all files related to what you are doing there plusev, k?  And file edits that you have done, please point me to the LINE #'s.  That way I don't have to waste time finding it myself and can focus primarily on what you want accomplished.

                      Thanks :)

                      plusev

                      • Proficient
                      • Offline
                      • Posts: 116
                      • OS:
                      • Windows XP
                      • Browser:
                      • MS Internet Explorer 7.0
                      Re: Help with Themes, etc.
                      « Reply #10 on: July 29, 2009, 10:47:23 PM »
                        The exact code is above as supplied by Shortie. Did the edits and it's functioning fine. Currently the Prev/Next text links browse the topics. What I was looking for was for the Prev/Next links to browse the pages within a topic.

                        SoLoGHoST

                        • SoLoGHoSt
                        • Connoisseur
                        • Offline
                        • Posts: 1709
                        • SMF MOD Expert!
                        • OS:
                        • Windows Vista/Server 2008
                        • Browser:
                        • MS Internet Explorer 8.0
                        Re: Help with Themes, etc.
                        « Reply #11 on: July 30, 2009, 12:46:58 AM »
                          Ok, gotcha, so you want the Prev Next links to browse through the current topic pages, instead of going to the next topic in that board.  So, if there are no more pages, than I suppose the Next link should be just text, not a link.  And if you are already on page 1, the Prev link should be text and not a link also.  And if there is only 1 page for that topic, both Prev & Next links should only be text, not links.  Will work an edit out for this, be back shortly.

                          Shortie

                          • Administrator
                          • Expert
                          • Offline
                          • Posts: 2556
                          • The Ultimate Boss
                          • OS:
                          • Windows 7/Server 2008 R2
                          • Browser:
                          • Firefox 3.5.1
                          Re: Help with Themes, etc.
                          « Reply #12 on: July 30, 2009, 01:21:07 AM »
                            Hi All

                            At a guess the best bet would be to find the existing code and just mod it for posts instead of topics

                            But you are the PHP Perfectionist so do what is best

                            As for page one and the last page could just turn the link off may be easier

                            Shortie
                            Thank You, "Guest" For Reading My Post.

                            SoLoGHoST

                            • SoLoGHoSt
                            • Connoisseur
                            • Offline
                            • Posts: 1709
                            • SMF MOD Expert!
                            • OS:
                            • Windows Vista/Server 2008
                            • Browser:
                            • MS Internet Explorer 8.0
                            Re: Help with Themes, etc.
                            « Reply #13 on: July 30, 2009, 02:08:15 AM »
                              Yep, has to be modded, and code has to be changed in Display.php and Display.template.php files.  Working on it right now, but don't know if I'll get the chance to finish since I'm currently a bit busy around the house...

                              We'll see...

                              SoLoGHoST

                              • SoLoGHoSt
                              • Connoisseur
                              • Offline
                              • Posts: 1709
                              • SMF MOD Expert!
                              • OS:
                              • Windows Vista/Server 2008
                              • Browser:
                              • MS Internet Explorer 8.0
                              Re: Help with Themes, etc.
                              « Reply #14 on: July 30, 2009, 02:55:12 AM »
                                FOR SMF 2.0.x Versions:
                                Ok, in ./Sources/Display.php @ around LINE #549...

                                FIND:
                                Code: [Select]
                                // Construct the page index, allowing for the .START method...
                                $context['page_index'] = constructPageIndex($scripturl . '?topic=' . $topic . '.%d', $_REQUEST['start'], $context['total_visible_posts'], $context['messages_per_page'], true);
                                $context['start'] = $_REQUEST['start'];

                                AFTER, ADD:
                                Code: [Select]

                                if (empty($context['start']))
                                $context['prev_topic_page'] = '<< Previous';
                                else
                                $context['prev_topic_page'] = '<< Previous';

                                if ($context['total_visible_posts'] <= ($context['start'] + $context['messages_per_page']))
                                $context['next_topic_page'] = ' Next>>';
                                else
                                $context['next_topic_page'] = ' Next >>';

                                Now in ./Themes/default/Display.template.php

                                FIND @ around LINE 131 (or whereever you have it defined, since I believe you changed this already):
                                Code: [Select]

                                REPLACE WITH:
                                Code: [Select]

                                There ya go, 2 Edits.  Anyways, never even changed the $context['previous_next'] variable.  So, if you want you can still use this variable wherever.
                                « Last Edit: July 30, 2009, 03:07:13 AM by SoLoGHoST »
                                 


                                Search


                                Latest Activity.
                                September's Logo Challenge "Up Top" (2009)... by NerdBoy
                                [Today at 08:07:54 PM]


                                Shortie's General wallpapers by NerdBoy
                                [Today at 06:44:34 PM]


                                Graphics Mayhem Wallpaper Collection September 2009 by Shortie
                                [Today at 05:14:55 PM]


                                GM Wall by NerdBoy
                                [Today at 04:04:12 PM]


                                GM Dock Images by NerdBoy
                                [Today at 04:01:03 PM]


                                SoLoSMiLeYS by SoLoGHoST
                                [Today at 03:41:21 PM]


                                Some Blue and Black Icons by Shortie
                                [Today at 03:18:17 PM]


                                Purple - To - Black Icons by Shortie
                                [Today at 01:58:46 PM]


                                Some #400040 Dock Icons blending to Black by Shortie
                                [Today at 10:29:06 AM]


                                Some Red and Black Dock icons by NerdBoy
                                [Today at 07:50:34 AM]


                                Some Green and Black Icons to share by Shortie
                                [Today at 07:45:02 AM]


                                Pixel Perfect For SMF 2.x RC1.2 by Shortie
                                [Yesterday at 06:04:33 PM]


                                Loop through posts from any given Board at a Set Interval by SoLoGHoST
                                [Yesterday at 10:30:26 AM]


                                A Genie by MJCSD
                                [September 09, 2009, 11:31:35 PM]


                                Want to start a topic here? by SoLoGHoST
                                [September 09, 2009, 10:49:57 PM]



                                Page created in 0.13 seconds with 25 queries.