[PAGINATE] cntprt [PB] cntprt [/PAGINATE]

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
User avatar
Oliver Georgi
Site Admin
Posts: 9913
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post by jsw_nz »

Viele Danke Oli,

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

Alle besten
:D
User avatar
Oliver Georgi
Site Admin
Posts: 9913
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post 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
saycan
Posts: 22
Joined: Wed 30. Aug 2006, 16:46

Post by saycan »

thanks very muchhhhh
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post 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,
:)
User avatar
Oliver Georgi
Site Admin
Posts: 9913
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Pagination for articles is ready. Content part pagination is under construction.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post 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
User avatar
Oliver Georgi
Site Admin
Posts: 9913
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post 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
. :)
User avatar
Oliver Georgi
Site Admin
Posts: 9913
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post 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
Last edited by Oliver Georgi on Wed 13. Dec 2006, 13:34, edited 3 times in total.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post by jsw_nz »

An interesting thought
{..........using a dhtml/css approach.............}
Peekay
Posts: 286
Joined: Sun 25. Jul 2004, 23:24
Location: UK

Post 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.
User avatar
Oliver Georgi
Site Admin
Posts: 9913
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
dbaron
Posts: 74
Joined: Tue 25. Jan 2005, 11:53
Location: France

Post 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
Post Reply