
Originally Posted by
lat9
You can also do "interesting" things like:
Code:
define ('CSS_BUTTON_POPUPS_IS_ARRAY', 'true');
define ('CSSBUTTONS_CATALOG_POPUPS_SHOW_BUTTON_NAMES_TEXT', ': No title defined; see ' . __FILE__);
$css_button_text = array ();
switch ($current_page_base) {
case FILENAME_ACCOUNT_EDIT:
case FILENAME_ACCOUNT_HISTORY:
case FILENAME_ACCOUNT_NEWSLETTERS:
case FILENAME_ACCOUNT_NOTIFICATIONS:
case FILENAME_ACCOUNT_PASSWORD:
$css_button_text['button_back'] = 'Return to <em>Manage Your Account</em>';
break;
default:
if (strpos ($current_page_base, FILENAME_ADDRESS_BOOK_PROCESS) !== false) $css_button_text['button_back'] = 'Return to your <em>Address Book</em>';
else $css_button_text['button_back'] = 'Return to the previous page';
break;
}
That is, you can customize the buttons' title text based on the page context.
Nice.. I'm sure I'll break some ish doing this
.. One question.. this example covers the back button.. Can I do the this without blowing something up??
Code:
define ('CSS_BUTTON_POPUPS_IS_ARRAY', 'true');
define ('CSSBUTTONS_CATALOG_POPUPS_SHOW_BUTTON_NAMES_TEXT', ': No title defined; see ' . __FILE__);
$css_button_text = array ();
switch ($current_page_base) {
case FILENAME_ACCOUNT_EDIT:
case FILENAME_ACCOUNT_HISTORY:
case FILENAME_ACCOUNT_NEWSLETTERS:
case FILENAME_ACCOUNT_NOTIFICATIONS:
case FILENAME_ACCOUNT_PASSWORD:
$css_button_text['button_back'] = 'Return to <em>Manage Your Account</em>';
break;
default:
if (strpos ($current_page_base, FILENAME_ADDRESS_BOOK_PROCESS) !== false) $css_button_text['button_back'] = 'Return to your <em>Address Book</em>';
else $css_button_text['button_back'] = 'Return to the previous page';
break;
switch ($current_page_base) {
case FILENAME_ACCOUNT_EDIT:
case FILENAME_ACCOUNT_HISTORY:
case FILENAME_ACCOUNT_NEWSLETTERS:
case FILENAME_ACCOUNT_NOTIFICATIONS:
case FILENAME_ACCOUNT_PASSWORD:
$css_button_text['button_forward'] = 'Return to <em>Manage Your Account</em>';
break;
default:
if (strpos ($current_page_base, FILENAME_ADDRESS_BOOK_PROCESS) !== false) $css_button_text['button_forward'] = 'Return to your <em>Address Book</em>';
else $css_button_text['button_forward'] = 'Return to the previous page';
break;
}