collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 388
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Blocks speak! Do you have an interest in getting more blocks - or even making your own? The Blocks Board is for you!

Author Topic: BoardNews constructPageIndex pagination.  (Read 6123 times)

0 Members and 1 Guest are viewing this topic.

Offline Zerito

  • Semi Newbie
  • *
  • Posts: 19
  • Gender: Male
  • >> The Ultimate Geek <<
    • TuxDescargas.Net
  • SMF Version: 2 Beta 3.0/3.1
  • SP Version: 2.3.2
BoardNews constructPageIndex pagination.
« on: October 11, 2010, 05:57:40 PM »
hi.. i got problem with this..
still does not work on my website.
i join:
http://www.miweb.net/?sa=news;start=8 (not work)
but y edit direction on browser:
http://www.miweb.net/index.php?sa=news;start=8 (yeah! work)

can help me please
ps: i do this editation: http://simpleportal.net/index.php?issue=374.0
still does not work

Offline 130860

  • Super Handsome Language Coordinator
  • Board Moderators
  • *
  • Posts: 1769
  • Gender: Male
  • You and I are not the same class of pirate!
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: BoardNews constructPageIndex pagination.
« Reply #1 on: October 11, 2010, 09:58:59 PM »
zerito,  muevo esto a la sección en español, dime si usas algun mod que modifique las url como pretty url o simple sef, dime los errores en el log de errores y una lista de los mods que tengas instalados.

Offline Topstarclub

  • Newbie
  • Posts: 2
    • casino
  • SMF Version: None
  • SP Version: None
Re: BoardNews constructPageIndex pagination.
« Reply #2 on: October 11, 2010, 11:54:35 PM »
Thank you and good knowledge.  :nervous-happy:
หากอยากรู้ว่าคุณจะสามารถชนะใจตนเองได้หรือไม่ให้เข้าไปใน casino เพราะที่ casino จะช่วยวัดใจคุณอย่างมีประสิทธิภาพ

Offline Zerito

  • Semi Newbie
  • *
  • Posts: 19
  • Gender: Male
  • >> The Ultimate Geek <<
    • TuxDescargas.Net
  • SMF Version: 2 Beta 3.0/3.1
  • SP Version: 2.3.2
Re: BoardNews constructPageIndex pagination.
« Reply #3 on: October 12, 2010, 11:28:52 AM »
pues si, me parece que el problema es la incompatibilidad con el SimpleSEF, pues lo desactivo y funciona normal la paginación.
sin embargo me doy cuenta que al ingresar a la página web d esta manera:
http://www.miweb.net/
aún sigue direccionando de esta manera http://www.miweb.net/?sa=news;start=8 lo bueno es que si funciona pero sería mejor que la paginación nos diera esta dirección: http://www.miweb.net/index.php?sa=news;start=8
en todo caso.. podrían ayudarme para que suceda esto? aún teniendo el simpleSEF

Offline 130860

  • Super Handsome Language Coordinator
  • Board Moderators
  • *
  • Posts: 1769
  • Gender: Male
  • You and I are not the same class of pirate!
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: BoardNews constructPageIndex pagination.
« Reply #4 on: October 12, 2010, 11:44:47 AM »
no es un problema de SP   enteramente,   yo tengo SP y simpleSEF funcionando correctamente en mi foro, aun no me has dicho que erorres hay en tu log de errores, que version de sp usas y un link a tu foro.


revisa el tema de soporte de ese mod, quiza otro usuario haya tenido el mismo problema y una solucion ya se haya dado.

Offline Zerito

  • Semi Newbie
  • *
  • Posts: 19
  • Gender: Male
  • >> The Ultimate Geek <<
    • TuxDescargas.Net
  • SMF Version: 2 Beta 3.0/3.1
  • SP Version: 2.3.2
Re: BoardNews constructPageIndex pagination.
« Reply #5 on: October 12, 2010, 12:19:06 PM »
según mi log, el único error es el siguiente:
 MasterZero
 190.0.0.0   
Hoy a las 11:12:10
cda21098955b4149de8e2bdcccd659c3
Tipo de error: Indefinidos
http://www.tuxdescargas.net/index.php?http://www.tuxdescargas.net/
8: Undefined offset: 302
Archivo: /home/username/public_html/Sources/PortalBlocks.php
Línea: 1071

pero esa línea hacer referenia solamente al block 'Recent Posts/Topics'
traté de ingresar al tema del simple sef pero no lo encuentro en los foros de smf

Offline 130860

  • Super Handsome Language Coordinator
  • Board Moderators
  • *
  • Posts: 1769
  • Gender: Male
  • You and I are not the same class of pirate!
  • SMF Version: 2 RC3
  • SP Version: 2.3.2

Offline Zerito

  • Semi Newbie
  • *
  • Posts: 19
  • Gender: Male
  • >> The Ultimate Geek <<
    • TuxDescargas.Net
  • SMF Version: 2 Beta 3.0/3.1
  • SP Version: 2.3.2
Re: BoardNews constructPageIndex pagination.
« Reply #7 on: October 12, 2010, 03:37:32 PM »
SMF Version: 2 RC3
SP Version: 2.3.2

me pasie por las 43 paginas y ninguno hay referencia con el problema que tengo y nose como hacer para fixear ese problema

Offline 130860

  • Super Handsome Language Coordinator
  • Board Moderators
  • *
  • Posts: 1769
  • Gender: Male
  • You and I are not the same class of pirate!
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: BoardNews constructPageIndex pagination.
« Reply #8 on: October 12, 2010, 05:32:16 PM »
adjunta tu archivo  /Sources/PortalBlocks.php

Offline Zerito

  • Semi Newbie
  • *
  • Posts: 19
  • Gender: Male
  • >> The Ultimate Geek <<
    • TuxDescargas.Net
  • SMF Version: 2 Beta 3.0/3.1
  • SP Version: 2.3.2
Re: BoardNews constructPageIndex pagination.
« Reply #9 on: October 12, 2010, 10:53:31 PM »
archivo adjuntado

Offline 130860

  • Super Handsome Language Coordinator
  • Board Moderators
  • *
  • Posts: 1769
  • Gender: Male
  • You and I are not the same class of pirate!
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: BoardNews constructPageIndex pagination.
« Reply #10 on: October 13, 2010, 10:27:04 AM »
ok, usa este

Offline Zerito

  • Semi Newbie
  • *
  • Posts: 19
  • Gender: Male
  • >> The Ultimate Geek <<
    • TuxDescargas.Net
  • SMF Version: 2 Beta 3.0/3.1
  • SP Version: 2.3.2
Re: BoardNews constructPageIndex pagination.
« Reply #11 on: October 13, 2010, 11:22:51 AM »

Offline 130860

  • Super Handsome Language Coordinator
  • Board Moderators
  • *
  • Posts: 1769
  • Gender: Male
  • You and I are not the same class of pirate!
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: BoardNews constructPageIndex pagination.
« Reply #12 on: October 13, 2010, 01:15:12 PM »
necesito hacer pruebas en local para ver donde esta el conflicto, dame algo de tiempo para revisar bien.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: BoardNews constructPageIndex pagination.
« Reply #13 on: October 13, 2010, 02:14:03 PM »
algo como?
Code: (replace) [Select]
  $clean_url = preg_replace('~(;|\?)?sa=news;start=\d+~', '', $_SERVER['REQUEST_URL']);
  $clean_url = preg_replace('~(sa,news/start,\d+~', $clean_url);  // clean pretty URL
  $current_url = $clean_url .
                      ( strpos($clean_url, 'index.php' ) !== false ? '' : 'index.php' ) .   //  necesita index.php
                      (strpos($clean_url, '?') !== false ? ';' : '?');
  $page_index = constructPageIndex($current_url . 'sa=news', $start, $limit, $per_page);
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline Zerito

  • Semi Newbie
  • *
  • Posts: 19
  • Gender: Male
  • >> The Ultimate Geek <<
    • TuxDescargas.Net
  • SMF Version: 2 Beta 3.0/3.1
  • SP Version: 2.3.2
Re: BoardNews constructPageIndex pagination.
« Reply #14 on: October 13, 2010, 03:32:35 PM »
hasta ahi vamos bien AngelinaBelle
quisiera saber que hace esto?:
Code: [Select]
$clean_url = preg_replace('~(sa,news/start,\d+~', $clean_url);
bien supongo que eso limpia las URL amigable de prettyurl o simplesef, sin embargo no sucede eso en la segunda página, para pasar a la tercera me resulta esta dirección:
http://www.miweb.net/sa,news/start,8/index.php?sa=news;start=16
« Last Edit: October 13, 2010, 03:35:25 PM by Zerito »

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: BoardNews constructPageIndex pagination.
« Reply #15 on: October 13, 2010, 04:56:20 PM »
Oh! I did not test it!
Code: [Select]
  $clean_url = preg_replace('~(;|\?)?sa=news;start=\d+~',  '',  $_SERVER['REQUEST_URL']);
  $clean_url = preg_replace('~(sa,news/start,\d+/~',          '',  $clean_url);  // clean pretty URL
  $current_url = $clean_url .
                      ( strpos($clean_url, 'index.php' ) !== false ? '' : 'index.php' ) .   //  necesita index.php
                      (strpos($clean_url, '?') !== false ? ';' : '?');
  $page_index = constructPageIndex($current_url . 'sa=news', $start, $limit, $per_page);
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline Zerito

  • Semi Newbie
  • *
  • Posts: 19
  • Gender: Male
  • >> The Ultimate Geek <<
    • TuxDescargas.Net
  • SMF Version: 2 Beta 3.0/3.1
  • SP Version: 2.3.2
Re: BoardNews constructPageIndex pagination.
« Reply #16 on: October 13, 2010, 05:06:59 PM »
sigue sin funcionarme bien.. quizá puedas entrar a mi web y fijarte?
http://www.tuxdescargas.net/

arriba tienes mi archivo portalblocks.php y para que sepas, tengo instalado el SimpleSEF.. creo que ahí está el problema, pues cuando deshabilito el simplesef funciona normal

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: BoardNews constructPageIndex pagination.
« Reply #17 on: October 13, 2010, 07:17:17 PM »
I am sorry I jumped in with an untested idea.  I should have waited until I had time to test.  Maybe a couple of days :)
 
Perhaps '~sa,news/start,\d+/~' is the correct regexp.
 
Simple SEF and SimplePortal are simply not compatable here.
What is needed is a tiny little mod to bridge the gap for boardnews and articles pagination.
 
My apologies. 
http://php.net/manual/en/function.preg-replace.php
http://www.php.net/manual/es/function.preg-replace.php
http://www.php.net/manual/es/reference.pcre.pattern.syntax.php
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: BoardNews constructPageIndex pagination.
« Reply #18 on: October 14, 2010, 07:16:45 AM »
Finally -- I tested the search string (in a custom php block)
Code: [Select]
$starturl='http://www.miweb.net/sa,news/start,8/';
$clean_url = preg_replace('~sa,news/start,\d+/~',          '',  $starturl); 
echo 'starturl ' , $starturl , '<br/>cleanurl ' , $clean_url;
So this ought to work in your PortalBlocks.php:
Code: [Select]
  $clean_url = preg_replace('~(;|\?)?sa=news;start=\d+~',  '',  $_SERVER['REQUEST_URL']);
  $clean_url = preg_replace('~sa,news/start,\d+/~',          '',  $clean_url);  // clean pretty URL
  $current_url = $clean_url .
                      ( strpos($clean_url, 'index.php' ) !== false ? '' : 'index.php' ) .   //  necesita index.php
                      (strpos($clean_url, '?') !== false ? ';' : '?');
  $page_index = constructPageIndex($current_url . 'sa=news', $start, $limit, $per_page);

regexps always hurt my eyes!
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline Zerito

  • Semi Newbie
  • *
  • Posts: 19
  • Gender: Male
  • >> The Ultimate Geek <<
    • TuxDescargas.Net
  • SMF Version: 2 Beta 3.0/3.1
  • SP Version: 2.3.2
Re: BoardNews constructPageIndex pagination.
« Reply #19 on: October 14, 2010, 11:00:09 AM »
AngelinaBelle you are my Queen!!
works perfectly! thanks alot.

gracias también a 130860 eres un gran helper  :D
« Last Edit: October 14, 2010, 11:12:35 AM by Zerito »