Next, Previous, Refresh Buttons

Request new functionality here
User avatar
idoxlr8
Bear Rating Trainee
Bear Rating Trainee
Posts: 46
Joined: 25 Mar 2013, 20:04
Location: Texas, USA
Contact:

Next, Previous, Refresh Buttons

Postby idoxlr8 » 01 Apr 2013, 17:58

I have been trying to stay on trunk, sometimes it's hard if you have mods.
I found the best way for me is to put my mods in a separate file and use an include.
Since there is no toolbar access, I have included a file with Refresh, Next and Previous buttons.
It's a simple hack from built-in functionality.
Image
nextprev.php

Code: Select all

         <button class="button_nav" onclick="viewCurrentFeed()">
         <img src="images/refresh.png" alt="Refresh Feed"></button>
         
         <button class="button_nav" onclick="moveToPost('prev',true)">
         <img src="images/up_arrow.png"></button>
         
         <button class="button_nav" onclick="moveToPost('next',true)">
         <img src="images/down_arrow.png"></button>


The css for the buttons:

Code: Select all

.button_nav{
   border: 1px solid #C0C0C0;
   background-color: #ecf4ff! important;
   opacity: 0.5;
   border-radius: 3px 3px 3px 3px;
   -moz-border-radius: 3px 3px 3px 3px;
   -webkit-border-radius: 3px 3px 3px 3px;
   width: 40px;
   height: 32px;
   cursor: pointer;
}
.button_nav:hover{
   border: 1px solid #C0C0C0;
   background-color: #ecf4ff! important;
   opacity: 1.0;
   border-radius: 3px 3px 3px 3px;
   -moz-border-radius: 3px 3px 3px 3px;
   -webkit-border-radius: 3px 3px 3px 3px;
   width: 40px;
   height: 32px;
   cursor: pointer;
}


and the images:
ImageImageImage

and the include code for index.php:

Code: Select all

         <?php include('nextprev.php'); ?>

         <div dojoType="dijit.form.DropDownButton">

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Next, Previous, Refresh Buttons

Postby fox » 01 Apr 2013, 18:06


User avatar
idoxlr8
Bear Rating Trainee
Bear Rating Trainee
Posts: 46
Joined: 25 Mar 2013, 20:04
Location: Texas, USA
Contact:

Re: Next, Previous, Refresh Buttons

Postby idoxlr8 » 01 Apr 2013, 18:23

How awesome is fox...
Thanks for all the hard work and great app...

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: Next, Previous, Refresh Buttons

Postby sleeper_service » 01 Apr 2013, 21:49

idoxlr8 wrote:How awesome is fox...
Thanks for all the hard work and great app...


pretty awesone.

User avatar
idoxlr8
Bear Rating Trainee
Bear Rating Trainee
Posts: 46
Joined: 25 Mar 2013, 20:04
Location: Texas, USA
Contact:

Re: Next, Previous, Refresh Buttons

Postby idoxlr8 » 02 Apr 2013, 03:00

Fox, thanks for the great work.
I have the plugin written and all works as planned...except...
One small change to the changes you made earlier.
The code below:

Code: Select all

      <?php
         global $pluginhost;
         foreach ($pluginhost->get_hooks($pluginhost::HOOK_TOOLBAR_BUTTON) as $p) {
             echo $p->hook_toolbar_button();
         }
      ?>

This needs to be moved inside <div class="actionChooser">
This solves a whole can of worms and css nightmares...
After making this change all is aligned once again...
This is where I put it: (scroll to see it all)

Code: Select all

      <div class="actionChooser">

         <button id="net-alert" dojoType="dijit.form.Button" style="display : none" disabled="true"
            title="<?php echo __("Communication problem with server.") ?>">
         <img
            src="images/alert.png" />
         </button>

         <button id="newVersionIcon" dojoType="dijit.form.Button" style="display : none">
         <img onclick="newVersionDlg()"
            src="images/new_version.png"
            title="<?php echo __('New version of Tiny Tiny RSS is available!') ?>" />
         </button>
      <?php
         global $pluginhost;
         foreach ($pluginhost->get_hooks($pluginhost::HOOK_TOOLBAR_BUTTON) as $p) {
             echo $p->hook_toolbar_button();
         }
      ?>

article_toolbar.zip
Article Toolbar
(6.48 KiB) Downloaded 120 times

Once again, Thanks for all of your hard work!

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Next, Previous, Refresh Buttons

Postby fox » 02 Apr 2013, 08:45

Then the buttons will appear on the right. Well, why not.

User avatar
idoxlr8
Bear Rating Trainee
Bear Rating Trainee
Posts: 46
Joined: 25 Mar 2013, 20:04
Location: Texas, USA
Contact:

Re: Next, Previous, Refresh Buttons

Postby idoxlr8 » 02 Apr 2013, 18:54

Thanks Fox, that makes for a smaller toolbar.
Image


Return to “Feature requests”

Who is online

Users browsing this forum: No registered users and 6 guests