About the template and stylesheet - and changing the menu
-
Tata
- Posts: 3588
- Joined: Tue May 20, 2008 5:34 am
- Location: Slovakia
-
Contact:
Post
by Tata » Sat Jul 26, 2014 7:09 am
I have slightly modified the ligon form.
Code: Select all
'<div class="regi_loginbutton_ver">'."\n".
//*** modified by Tata
// tag('input class="regi_loginbutton_ver" type="image" name="login" src="'.$imageFolder.'/'.$plugin_cf[$plugin]['image_login'].'" alt="'.$plugin_tx[$plugin]['login'].'" title="'. $plugin_tx[$plugin]['login'].'"')."\n".
// ' '.$plugin_tx[$plugin]['login'].'</div>'."\n";
//***
tag('input class="regi_loginbutton_ver submit_button" type="submit" name="login" value="'.$plugin_tx[$plugin]['login'].'" ')."\n";
//***
and
Code: Select all
//*** added '.$plugin_tx[$plugin]['register'].' into the <Button> tag
$o .= '<a href="'.$sn.'?'.html_entity_decode(preg_replace("/ /", "_", $plugin_tx[$plugin]['register'])).'">
<button class="submit_button">'.$plugin_tx[$plugin]['register'].'</button></a>'."\n".'</div>'."\n".'</form>'."\n".'<div style="clear: both;"></div>'."\n".'</div>'."\n";
else
$o .= '</div>'."\n".'</form>'."\n".'<div style="clear: both;"></div>'."\n".'</div>'."\n";
}
Debuger also reported unknown $vars in hi_pd_sctipting in en.php. So I changed
Code: Select all
$plugin_tx['hi_pd_scripting']['hint_code']="<p>Add here the code to activate your plugin or script. Examples:</p><p><i>myplugin($vars)</i>...
to
Code: Select all
$plugin_tx['hi_pd_scripting']['hint_code']="<p>Add here the code to activate your plugin or script. Examples:</p><p><i>myplugin(%24vars)</i>...
Also the Register function returns Login Error. Where to look for the problem?
Have a look at
http://chateaufeely.cmsimple.sk.
Last edited by
Tata on Sat Jul 26, 2014 8:03 am, edited 1 time in total.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
-
cmb
- Posts: 14225
- Joined: Tue Jun 21, 2011 11:04 am
- Location: Bingen, RLP, DE
-
Contact:
Post
by cmb » Sat Jul 26, 2014 7:39 am
Tata wrote:Now there is the "?>" on the very beginning of the webpage. Also the Register function returns Login Error. Where to look for the problem?
It might be simplest to (temporarily) change the value of the PHP ini setting output_buffering. Try to set up a .htaccess in the installation folder:
If the server accepts this setting, CMSimple_XH should report something like "Cannot modify headers. Output already started at ..."
Tata wrote:Debuger also reported unknown $vars in hi_pd_sctipting in en.php.
Yes, that is a relict of a longstanding bug in CMSimple(_XH), where the language strings were not properly escaped on saving from the back-end. The following is correct:
Code: Select all
$plugin_tx['hi_pd_scripting']['hint_code']="<p>Add here the code to activate your plugin or script. Examples:</p><p><i>myplugin(\$vars)</i>...";
-
cmb
- Posts: 14225
- Joined: Tue Jun 21, 2011 11:04 am
- Location: Bingen, RLP, DE
-
Contact:
Post
by cmb » Sun Jul 27, 2014 10:55 am
Tata wrote:Also the Register function returns Login Error. Where to look for the problem?
I tried the
W3C Validator which gave me a hint:
The element button must not appear as a descendant of the a element.
Code: Select all
<button class="submit_button">Register</button></a>
Clicking on the register button confimed my suspicion: it triggers a POST request instead of a GET. This is caused by your modification:
Code: Select all
$o .= '<a href="'.$sn.'?'.html_entity_decode(preg_replace("/ /", "_", $plugin_tx[$plugin]['register'])).'">
<button class="submit_button">'.$plugin_tx[$plugin]['register'].'</button></a>'
If a button is placed inside a form element, clicking the button triggers form submission. You don't want that behavior in this case (instead you want the button to follow the link), so you have to set the type attribute to "button":
Code: Select all
$o .= '<a href="'.$sn.'?'.html_entity_decode(preg_replace("/ /", "_", $plugin_tx[$plugin]['register'])).'">
<button type="button" class="submit_button">'.$plugin_tx[$plugin]['register'].'</button></a>'
-
Tata
- Posts: 3588
- Joined: Tue May 20, 2008 5:34 am
- Location: Slovakia
-
Contact:
Post
by Tata » Sun Jul 27, 2014 11:17 am
Yeah, that's it. Thanks a lot.
How much need one to learn to know all you do?
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.