Jump to content


These Forums Are Now Read-Only


For TubePress support, please post a question here or open a support ticket and we will be glad to assist.


Photo

Pagination Editing


  • Please log in to reply
2 replies to this topic

#1 Sam Thornton

Sam Thornton

    Member

  • Members
  • PipPip
  • 19 posts

Posted 17 August 2011 - 10:15 AM

Eric,

May I first apologise for posting my problem below as a reply to another users problem along with this initial post but mine does differ from his slightly.

Basically what I am trying to achieve with Tubepress is simply a Next & Previous link for the pagination, no 1,2,3 etc in between but preferably trying to keep the Ajax function there as it's something I purchased TubePress for. Is this currently possible, if so please could you point me in the right direction as I have seen a couple of methods you have posted or others have spoken about but relate to an earlier version of the plugin from 2010.

Any assistance regarding this and a prompt response would be much appreciated.

Regards
Sam

#2 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 19 August 2011 - 12:33 PM

Hi Sam,

There are a two ways that you can accomplish this (that I can think of).

The first is to simply edit the PHP class where the pagination HTML is generated. This isn't the best route, because it's not upgrade-proof. But if you want to anyway, here is where that happens at the moment.

The second way, and this would be preferred, would be to implement your own TubePress plugin. TubePress plugins were somewhat quietly added in 2.2.5, and allow you to modify TubePress in an upgrade-proof manner. Keep in mind, however, that there is a rather major bug that wipes out any plugins if you use WordPress's manual update. This will be fixed in the next version of TubePress, but please be aware of it!

That said, here's what you can do:

  • Create a directory at tubepress_pro_2_2_7/content/plugins/myplugin
  • Create a file at tubepress_pro_2_2_7/content/plugins/myplugin/myplugin.php
  • Edit myplugin.php and fill it in with
    class MyPlugin{    public function alter_paginationHtml($paginationHtml, $providerName)    {        $newPaginationHtml = //perform processing on original $paginationHtml                return $newPaginationHtml;    //do not forget to return the modified HTML!    }}TubePress::registerFilter('paginationHtml', new MyPlugin());
Does that make sense? I apologize for the lack of real documentation on TubePress plugins, but rest assured that they are the future of TubePress and are a first-class feature. I want to iron out issue 349 before actually publicizing the capability.

Let me know if you need help actually modifying the HTML to strip out the 1, 2, 3... Thanks!

#3 Sam Thornton

Sam Thornton

    Member

  • Members
  • PipPip
  • 19 posts

Posted 21 August 2011 - 11:08 AM

Hi Eric,

Thanks for your response, I understand what you are saying however my PHP knowledge is a little basic and certainly not that advanced ot go ahead and create 'said' plugin.

Is there anyway you could be of more assistance regarding this issue?

Regards
Sam