labs33
Forum Replies Created
-
Forum: Plugins
In reply to: [Theme My Login] Problem with password recovery or changeI think I figured it out: We had copies of reset pass-form.php etc in our theme file (trying to achieve multilingual functionality). Renaming/removing that file allows the updated file from the plugin to display.
Forum: Plugins
In reply to: [Theme My Login] Problem with password recovery or changeI have the latest TML (Version 6.4.3 – no updates showing), and I am experiencing the same issue:
“when I try to change password, the confirm password field only take one character and rewrite all other password fields.”
Trying to reset the password does this every time … I type the new password in the first password field. Then begin to type the password again to confirm, but no characters get typed in that field and one character gets typed in the first field, overriding what was previously typed.
I am using xili-language with the latest WP Touch Pro, and I have been able to edit the header and footer to switch the language of the home page URL and footer text (does not switch to the corresponding page within the site, though – only brings you to the home page in the language you select).
Here is my case scenario using English and French:
1) Create a child theme or copy of the WP Touch theme you are using.
2) Via FTP, edit the functions.php file (wptouch-data>themes>yourtheme>default>) to include the following (alter for your languages of course):
function is_french() { if (the_curlang() == 'fr-ca') return true; else return false; } function current_url() { $pageURL = 'http'; if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") { $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; } else { $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; } return $pageURL; } function my_xili_language_list($before = '<li>', $after ='</li>') { $listlanguages = get_terms(TAXONAME, array('hide_empty' => false)); $currenturl = get_bloginfo('siteurl').'/?'; $a = ""; $lines = array(); $lineorder = array('en_ca'=>1,'fr-ca'=>2); /* line to modify where to declare the top languages */ foreach ($listlanguages as $language) { if ($before=='<li>') { if (the_curlang() == $language->slug) { $beforee = '<li class="current-cat" >'; } else { $beforee ='<li>'; } } if (isset($lineorder[$language->slug])) { $key = $lineorder[$language->slug]; /* set line sort */ } else { $key = 1000 + $language->term_id; /* if array is empty */ } $lines[$key] = $beforee ."<a href='".$currenturl.QUETAG."=".$language->slug."' title='".__('Posts ',THEME_TEXTDOMAIN)." ".__(''.$language->description,THEME_TEXTDOMAIN)."'>". __(''.$language->description,THEME_TEXTDOMAIN) ."</a>".$after; } ksort($lines); /*sort lines by key */ foreach ($lines as $line) { $a .= $line; } echo $a; } add_action('xili_language_list','my_xili_language_list',10,3); /* activate my_xili... instead the default in plugin */
3) In the same folder, you can add your language switcher to header-bottom.php. For instance:
<div style="float:left; position:relative; margin:4px 5px; width:130px; overflow:hidden; height:40px;"> <div id="lang-menu"> <ul class="nav fl"> <?php if (function_exists('my_xili_language_list')) { my_xili_language_list('<li>','</li>','siderss'); } ?> </ul> </div> </div>
4) You’ll have to edit the styles.css to look good with your new language switcher. For instance:
.menu-bumper { height: 45px; width: 100%; position: relative; top: -1px; } a.toggle-button, a.login-button { color: rgba(0,0,0,.65); text-shadow: rgba(255,255,255,.4) 0 1px 0; position: absolute; display: block; right: 8px; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; padding: 4px 12px; top: 10px; font-size: 98%; line-height: 1.2em; } #lang-menu .nav { padding: 0px 6px; margin:0; overflow:hidden;} #lang-menu .nav li a { padding:0px 5px; float:left; position:relative; margin:4px 5px; padding:7px 15px 5px; color:white; font-size:14px; border:1px solid white; border-radius:5px; display:block;}
5) You can also edit footer-top.php to have language-specific content using something like this:
<? if(is_french()){ ?> FRENCH FOOTER <? } else { ?> ENGLISH FOOTER <? } ?>
If anyone figures out how to make it so that it will switch to the other version of the same page, please let me know!