Keyword

Uber Page Break does not create sef urls

More
13 years 3 months ago #94103 by AdrianK
Replied by AdrianK on topic Uber Page Break does not create sef urls
Hmm, also wenn man mehr Punkte im TOC (table of contents) hat als auf einmal angezeigt, dann verschiebt sich limitstart, etwas schwer zu erklären.

Please Log in or Create an account to join the conversation.

  • Adamo
  • Adamo's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 3 months ago #94104 by Adamo
Replied by Adamo on topic Uber Page Break does not create sef urls
In english please :)

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #94105 by 3cantos.org
Replied by 3cantos.org on topic Uber Page Break does not create sef urls
Hi, I am working on migrating our web. I will use K2. I think i´ve solved this problem by a little hack in sh404sef.class.php. No uberpagebreak hacking needed.

Arround line 1836 in sh404sef.class.php you´ll see  "// V 1.2.4.t special processing to replace page number by headings..."

Here, we need to check if option is com_k2 and, if so, we need to change the query.

1.- Change  


if ( strpos($url, 'option=com_content') !== false && strpos($url, 'view=article') !== false && !empty($limitstart) )


 

New code:

 

if ((  strpos($url, 'option=com_content') !== false  && strpos($url, 'view=article') !== false && !empty($limitstart) )  || (  strpos($url, 'option=com_k2') !== false  && strpos($url, 'view=item') !== false && !empty($limitstart) ))

 

2.- Change this line


$sql = 'SELECT c.id, c.fulltext, c.introtext FROM #__content AS c WHERE id=\''.$shParams.'\'';


new code:

  if (strpos($url, 'option=com_k2')) $sql='SELECT c.id, c.fulltext, c.introtext  FROM #__k2_items AS c WHERE id=\''.$shParams.'\''; else  $sql = 'SELECT c.id, c.fulltext, c.introtext  FROM #__content AS c WHERE id=\''.$shParams.'\'';

 

That´s all. Sef url´s with uberpagebreak tabs and no duplicates due to the plugin. Now I am working on k2 comments links (when comments pagination is present and uberpagebreak present in the item). But this looks easier...

 

I hope this simple way to solve this problem works for other people, it took long time to find it out (i am not a professional developer..) I think sh404sef configuration doesn´t matter for this solution, but I´m not sure about this. I´ll test.

 

Please Log in or Create an account to join the conversation.

  • Adamo
  • Adamo's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 3 months ago #94106 by Adamo
Replied by Adamo on topic Uber Page Break does not create sef urls
Great hack!!! Very good! :)

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #94107 by BBC
Tried both of solutions....but...very, very unstable. It doesn´t work OK.

 

For some time, but when you purge URL cache and Joomla cache same and even worst can happen again. Unstable.

 

I will see how to make nice buttons in Jooma default pagebreak. Then i don´t need some "Uberpagebreak".

Just complicating things.

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #94108 by BBC
Here you have how to activate Joomla pagebreak in K2 Items:
forum.joomla.org/viewtopic.php?f=471&t=511990&p=2129357#p2129357

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #94109 by BBC
Most ironic is that Uberpagebreak plugin doesn´t work with SEF even at the demo K2 page:

demo.getk2.org/en/category-blog/item/49-uberpagebreak

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #94110 by BBC
I disabled Uberpagebreak plugin.

 

It is not so easy to fix that problem. Developers from sh404SEF would put this few lines of code long ago if it would be enough. But they did not do it, and there is sure reason for that.

Please Log in or Create an account to join the conversation.

More
13 years 1 month ago #94111 by Francis Darren
Replied by Francis Darren on topic Uber Page Break does not create sef urls
I've tried some of the solutions that were written, its still not perfect. Previous and Next button doesn't work properly.

Please Log in or Create an account to join the conversation.

More
13 years 1 month ago #94112 by AdrianK
Replied by AdrianK on topic Uber Page Break does not create sef urls
You can change to artio joomsef, if you can, that will fix some issues.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum