Pages (2):    1 2
Administrator
Administrator
acrylian   19-10-2017, 14:43
#21

You need a plugin that also hooks on the getLink filter and then modify the url before returning it to match the rewritten one.

zp_register_filter('getLink', 'modify_url'); function modify_url($link, $page) { if($page == "index.php") { // $link the is the url you need to modify to your rewrittten one } return $link; }

Very quick example offhand, not tested.

Member
Member
sbillard   19-10-2017, 15:21
#22

There are two problems (bugs) that need to be fixed. First, the template-functions.php function getPageNumURL() needs to be fixed to handle custom pages:

$pg = stripSuffix($_zp_gallery_page); if (array_key_exists($pg, $_zp_conf_vars['special_pages'])) { $pagination1 = preg_replace('~^_PAGE_/~', _PAGE_ . '/', $_zp_conf_vars['special_pages'][$pg]['rewrite']) . '/'; } else { $pagination1 = '/' . _PAGE_ . '/' . $pg . '/'; }

Then the galleryToken plugin needs to have added a rewrite rule for handling the page numbers:

$_zp_conf_vars['special_pages'][] = array('define' => false, 'rewrite' => '%GALLERY_PAGE%/([0-9]+)', 'rule' => '^%REWRITE%/*$ index.php?p=gallery&page=$1' . ' [L,QSA]');

Administrator
Administrator
acrylian   19-10-2017, 15:25
#23

Thanks for this actual contribution. Will look into that as soon as I get the time.

Administrator
Administrator
acrylian   19-10-2017, 18:17
#24

@vincent3569 I have decided I will add this to core tomorrow.

Member
Member
vincent3569   23-10-2017, 06:37
#25

thanks Malte and Stephen!
I made a pull request to fix a typo on the new getCustomGalleryIndexPage() function.

with that, it works fine for my needs.

Member
Member
mikapi   27-02-2018, 20:26
#26

I do not see a "PAGE/gallery" value in admin>options>extensions>rewriteToken.

Is it the right place to set the gallery url ?
I use Zenphoto 1.4.14

Administrator
Administrator
acrylian   27-02-2018, 20:29
#27

The change discussed is not in 1.4.14 but in the coming version 1.5. You can preview that as the support build (or master) from Github.

Member
Member
mikapi   28-02-2018, 00:24
#28

That's that, I just understand that the master branch is the one with the last commits. I have tested it, it's ok.

The zip linked on the homepage is Zenphoto 1.4.14 Jan 28, 2017, and the new function since october 2017, so I mistakenly thought it was included.

Administrator
Administrator
acrylian   28-02-2018, 10:46
#29

We only will change the numer when we actually release it. Until then we keep the old version. Remember to re-run setup in case it doesn't request to run automatically.

Pages (2):    1 2
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.