Hey there,
im working on a better system to catch functions i've most seen on some ZenPhoto pages and got some questions. Maybe here i find other guys which try to modificate the theme system over a special theme.
The plan is to use the pages.php file for functions like: register, verify, home, contact, imprint and so on. So nobody need to change 100 files to style them or maybe change something.
It use functions which request if the plugin is used and activated on the special theme. Later it will open an insert field to add the text and so on.
But the problem is, when i insert the registration part (printRegistrationForm();) it dont print the login when i use the verify link to validate a user. The verify works with an: if ($_GET['verify']))
So the question is, is it possible to change out of the themes folder the link from:
/page/register?verify=hash
to:
/page/pages?verify=hash
All other things works great, i just have to check which link is used so i can change the title, index and so on. And if you want to ask "why do you do that" think about changing up to 15 files or one. Its easier, faster and not so confusing
Greez
Comments
`/pages/` is a static custom theme page not managed by the backend.
Let's say one guy makes an awesome theme, but dont include some files or functions, you can't use it and without the knowledge you can't add this stuff to this theme. And when you know how, you have to include and style it to your needs.
Your right, it isnt, not now! But over special theme settings i can do all i need. Like sort links, check if someone need contact, imprint and give the opportunity to add the needet text. All out of one admin page into one page in the frontend. But atm not for news, while the function set the handles where we move when we use a link...
So i also can include css files which say where our sidebar is, where the contend, which color our theme has. And that will happen over one file, not over 20 you know what i mean?
And pages.php will manage the zenpage pages too.
-----------------------------------------------
if (($zpmas_useregister == true) && ($site == gettext("Verify"))) { echo gettext("Verify"); } else {
printPageTitle(); }
-----------------------------------------------
...in this way. So i can also say, print in the sidebar a on contact, and b on imprint. But the question i've got is:
How can i manipulate the links to my needs:
from:
/page/register?verify=hash
to:
/page/pages?verify=hash
greez
One note `($site == gettext("Verify")))` you reallly should think about that check... you need to check for the fixed name of an item, never translatable text that changes with each langauge (you hopefully know what gettext is about?).
I don't know offhand about the links, but probably the register functions have parameters for the link. Maybe review the documentation on that. Otherwise you need to make your own custom versions.
<? if (($zpmas_useregister == true) && ($site == gettext("Register")) || ($_GET['verify'])){ ?>
<div class="post"><h1><?php echo gettext('User Registration') ?></h1>
<?php printRegistrationForm(); ?></div>
<? } elseif { ?>
NEXT item
<? } else { ?>
DO NORMAL THINGS HERE
<? } ?>
So if the user use the link out of the email he get verified but not get the needet login under the line:
"Thanks for the Register.
You can sign up on the page and verify your personal details now."
The login under these lines needs the register.php i think so this link is static?! In my idea the functions should be more flexible and dont need the register.php.
And by the way, why a user have to login with his email and not with the username?! At the Master it works with the username, why not for all users? Is it a bug or have you forgotten to switch it to user?
Greez
*EDIT*
Works just if i register new. For all other old accounts you have to login with the email.
He also print the login form under the confirmation lines. But he jumps to the admin login after login with the user. There must be something wrong with the plugin i think?!
But back to the question, how i can get the right path without the register.php or maybe album.php. So that i can manage all over the pages.php with the right features like the login field?
Greez
Of course if someone has registered with his e-mail as his user id then he will have to use that to log in. What else would you expect?
If you want a registration form as part of (Zenpage) pages content you will have to code that yourself. Otherwise the script name is settable by an option of the plugin, but it cannot be set to one of the script names used in the Zenphoto rewrite rules as those rules do not permit that.