Page 2 of 3

Posted: Sat 12. Aug 2006, 08:20
by Oliver Georgi
To handle white spaces in REGEXP too, just do this (it's the little s after the /):

Code: Select all

if( ! (strpos($content["all"],'[PAGINATE]')===false)) {
   $content["all"] = preg_replace('/\[PAGINATE\](.*?)\[\/PAGINATE\]/se', 'show_page("$1");', $content["all"])   
}
A global replace of all line breaks is no good idea - because just "\n" might no be enough - there is also "\r" on windows ;-)

Oliver

Posted: Sat 12. Aug 2006, 09:03
by jsw_nz
Viele Danke Oli,

Wie ich sagte, bin ich noch ein Kurstnehmer....
nie zu alt...

Alle besten
:D

Posted: Sat 12. Aug 2006, 10:58
by Oliver Georgi
jsw_nz wrote:Viele Danke Oli,

Wie ich sagte, bin ich noch ein Kurstnehmer....
nie zu alt...

Alle besten
:D
Oh what the fucking hell is this - translation by Google ;-)

Oliver

Posted: Sat 12. Aug 2006, 11:04
by jsw_nz
hehe....well kind of....

anyway -
i think i will try to learn php first....before learning German
Thanks for the preg_replace pointer

All best Oli
- :D

Posted: Thu 31. Aug 2006, 12:11
by saycan
thanks very muchhhhh

Posted: Sun 15. Oct 2006, 02:45
by jsw_nz
Been away for a few (4+) weeks - just wanted to ask OliG about the progress of implementing this scheme in next release - the ability to paginate different contentparts within a presentation scheme - (i have to think) - is really new - so if phpWcms supports this in the future - this could be a real breakthrough for not just the system - but for cms systems in general....

all best from nz,
:)

Posted: Sun 15. Oct 2006, 09:26
by Oliver Georgi
Pagination for articles is ready. Content part pagination is under construction.

Oliver

Posted: Tue 28. Nov 2006, 04:38
by jsw_nz
Hi Oliver

In principle -- this might be a great place to explore AJAX (frontend)
-
Since my code is suboptimal (i agree) - this leaves open a better solution...

Which

paginates contentparts
AND refreshes fur (800 x 600 oder 1280 x 768) parameters

Scenario
(1) the user clicks on article.....
(2) sees the article with 'built - in" wcms pagination....
(3) uses a phpwcms navbar, and clicks....
(4) and gets 'ajax-refreshed' at (800 x 600 oder 1280 x 768) compliant page

the end experience would be like
'turning pages in a book'

ROBUST
SIMPLE
EFFICIENT
USER-FRIENDLY

your thoughts?
:D

postcript:
obviously the print feature would have
to strip out the pagination code and
show/display a fully printable single page

Posted: Tue 28. Nov 2006, 07:50
by Oliver Georgi
I like AJAX very much - but most times for backend only. In general you have to be sure that users have JavaScript enabled or it might fail. OK - can be handled by working around using the classical way.

For many webpages out there "page visits" are very important - so you have to be sure that a real page load happens.

It might be a future feature.

Oliver

Posted: Wed 29. Nov 2006, 02:28
by jsw_nz
Yes, do understand....

Guessing you already have a long term strategy for the backend such as
...drag n drop to change ordering of categories, articles and contentparts
...opening / closing of '+' and '-' icons

My interest using AJAX on paginated contentparts is experimental really - since I am doing a research project - may try to find a way (aka hack) to do this - just to get user feedback - 'page visit' would be in place - even thinking bookmarking url with paginated info would be possible - so basically a limited use of AJAX.

BTW - I took a second look at Typo3 and still contend that despite its power - the gui - backend is still overly confusing
Your approach is far more intuitive and represents a better design solution...

all best
. :)

Posted: Wed 29. Nov 2006, 08:30
by Oliver Georgi
phpwcms should not become a clone of Typo3 - it's there so no need to be complex as Typo3.

AJAX needs more work than just hacking the code. It has to be well projected and always asked: is it neccessary.

If you think about Ajax - first think about realizing your paginating by combined "hide/show layer". It's safe in case of disabled JavaScript because hiding can be done by simple CSS.
see www .br es so .de /103.100.0.0.1.0. phtml and "send a friend" form. Visit the page with JS enabled/disabled.

Oliver

Posted: Thu 30. Nov 2006, 11:09
by jsw_nz
An interesting thought
{..........using a dhtml/css approach.............}

Posted: Fri 19. Jan 2007, 22:14
by Peekay
If anyone trying this (very nice) mod gets a 'page not found error', you could try editing line 17 of 'paginate_content.php' to read:

Code: Select all

 $this_url = "http://".$_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"]."?".$_SERVER["QUERY_STRING"]; 
The REQUEST_URI function just doesn't work on my setup.

Posted: Sat 20. Jan 2007, 00:15
by Oliver Georgi
Peekay wrote:If anyone trying this (very nice) mod gets a 'page not found error', you could try editing line 17 of 'paginate_content.php' to read:

Code: Select all

 $this_url = "http://".$_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"]."?".$_SERVER["QUERY_STRING"]; 
The REQUEST_URI function just doesn't work on my setup.
No good idea - such value still exists as simple PHP constant: FE_CURRENT_URL

Oliver

Posted: Fri 2. Feb 2007, 09:17
by dbaron
Hello

I try to use the pagination system in pre1.2.9 .....
Oliver Georgi wrote:Pagination for articles is ready. Content part pagination is under construction.

Oliver

but without success.

Help please !!

Thanks