PupStar Posted August 4, 2011 Posted August 4, 2011 Hi Guys, I am having another blonde moment :'( I am using this code tep_draw_button(HEADER_TITLE_LOGIN, 'person', '<a href="#" data-reveal-id="myModal">Sign In</a>') . ' ' . However my mind block is causing me this headache Any help would be appreciated. Thanks Mark
pdcelec Posted August 4, 2011 Posted August 4, 2011 is it the use of " double quotes instead of single ' ?
PupStar Posted August 4, 2011 Author Posted August 4, 2011 is it the use of " double quotes instead of single ' ? thought of that already but it just crashes the site completely :-"
pdcelec Posted August 4, 2011 Posted August 4, 2011 thought of that already but it just crashes the site completely :-" single quotes but escaped? \' instead of "
PupStar Posted August 4, 2011 Author Posted August 4, 2011 single quotes but escaped? \' instead of " that fixes the display issue but breaks the link. Thanks Mark
pdcelec Posted August 4, 2011 Posted August 4, 2011 that fixes the display issue but breaks the link. Thanks Mark This is what I have in mine http://www.electricalcity.co.uk , I also have a mind blank at mo - but I am sure this could be adapted for yours <?php if (!tep_session_is_registered('customer_id')) { ?> <a title="Login" href="<?php echo tep_href_link(FILENAME_LOGIN); ?>" class="topmenu_link"><?php echo TEXT_LOGIN ?></a> <?php } else { ?> <a title="Logoff" href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="topmenu_link"><?php echo TEXT_LOGOFF ?></a> <?php } ?>
PupStar Posted August 4, 2011 Author Posted August 4, 2011 This is what I have in mine http://www.electricalcity.co.uk , I also have a mind blank at mo - but I am sure this could be adapted for yours <?php if (!tep_session_is_registered('customer_id')) { ?> <a title="Login" href="<?php echo tep_href_link(FILENAME_LOGIN); ?>" class="topmenu_link"><?php echo TEXT_LOGIN ?></a> <?php } else { ?> <a title="Logoff" href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="topmenu_link"><?php echo TEXT_LOGOFF ?></a> <?php } ?> Paul, I am trying to do it my way so I can still use tep_draw_button which will keep all my header links the same. I had a quick look at your site and noticed that when you click the 'Log In' button the page changes to the login page and then the login popup appears. The way I am doing it is with this jquery modal Reveal Maybe something will jump into my mind whilst out for a chinese tonight :thumbsup: Mark
PupStar Posted August 5, 2011 Author Posted August 5, 2011 well last nights meal out and few beers did not resolve my mind block urgh :blink:
PupStar Posted August 5, 2011 Author Posted August 5, 2011 ok so this is where I am upto now. tep_draw_button(HEADER_TITLE_LOGIN, 'person', '<a href="' . tep_href_link(FILENAME_LOGIN, '#', 'SSL') . '" data-reveal-id="myModal">') . 'Sign In Now</a> ' . The link works perfectly but does not display correctly. One nut well and truely done in :blink: Mark
PupStar Posted August 5, 2011 Author Posted August 5, 2011 Sorry guys but if you can help then please do as I could really do with getting this sorted tonight. Thanks Mark :thumbsup: ok so this is where I am upto now. tep_draw_button(HEADER_TITLE_LOGIN, 'person', '<a href="' . tep_href_link(FILENAME_LOGIN, '#', 'SSL') . '" data-reveal-id="myModal">') . 'Sign In Now</a> ' . The link works perfectly but does not display correctly. One nut well and truely done in :blink: Mark
PupStar Posted August 14, 2011 Author Posted August 14, 2011 Any ideas appreciated chaps :thumbsup: Thanks Mark
germ Posted August 14, 2011 Posted August 14, 2011 If you PM me the URL I'll take a peek. If this is being developed on your localhost I guess you're on your own. :blush: If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
germ Posted August 14, 2011 Posted August 14, 2011 ok so this is where I am upto now. tep_draw_button(HEADER_TITLE_LOGIN, 'person', '<a href="' . tep_href_link(FILENAME_LOGIN, '#', 'SSL') . '" data-reveal-id="myModal">') . 'Sign In Now</a> ' . The link works perfectly but does not display correctly. One nut well and truely done in :blink: Mark Try this in place of the code you posted: tep_draw_button(HEADER_TITLE_LOGIN, 'person', tep_href_link(FILENAME_LOGIN, '#', 'SSL')) . If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
PupStar Posted August 14, 2011 Author Posted August 14, 2011 Try this in place of the code you posted: tep_draw_button(HEADER_TITLE_LOGIN, 'person', tep_href_link(FILENAME_LOGIN, '#', 'SSL')) . that works fine. I do however need the data-reveal-id="myModal" for the login modal to work. Mark
germ Posted August 14, 2011 Posted August 14, 2011 I was afraid of that. The fact is there is no place in the current code base to supply those parameters. :'( If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
PupStar Posted August 15, 2011 Author Posted August 15, 2011 I was afraid of that. The fact is there is no place in the current code base to supply those parameters. :'( so maybe its time to write a new function then. Will have a go at that tonight after tea and bath. Cheers anyway mate :thumbsup:
germ Posted August 15, 2011 Posted August 15, 2011 Copy the code for the function tep_draw_button() in the file /includes/functions/html_output.php and create another function called tep_draw_button2() Then in the new function change this line: $button .= '<a id="tdb' . $button_counter . '" href="' . $link . '"'; To: $button .= '<a data-reveal-id="myModal" id="tdb' . $button_counter . '" href="' . $link . '"'; Then change the code in the header to use tep_draw_button2() for the login button only. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
PupStar Posted August 15, 2011 Author Posted August 15, 2011 Copy the code for the function tep_draw_button() in the file /includes/functions/html_output.php and create another function called tep_draw_button2() Then in the new function change this line: $button .= '<a id="tdb' . $button_counter . '" href="' . $link . '"'; To: $button .= '<a data-reveal-id="myModal" id="tdb' . $button_counter . '" href="' . $link . '"'; Then change the code in the header to use tep_draw_button2() for the login button only. Jim, that works well apart from screwing with the ui-icons. Take a look at the link I pm'd you the other day. Mark
germ Posted August 15, 2011 Posted August 15, 2011 I have your source code you sent me. I'll play around with the code on my WAMP server and see if I can get it to work. I've doodled with the code in Firefox so I know what will work. It's just a question of getting the output correct. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
PupStar Posted August 15, 2011 Author Posted August 15, 2011 I have your source code you sent me. I'll play around with the code on my WAMP server and see if I can get it to work. I've doodled with the code in Firefox so I know what will work. It's just a question of getting the output correct. Cheers Jim, I must sign off now and get some sleep as I have an early start and a late finish tomorrow urgh. Thanks for all your efforts, it truely is appreciated. Mark
germ Posted August 15, 2011 Posted August 15, 2011 In the new function tep_draw_button2() remove this line of code: static $button_counter = 1; That made the code look like it will work when I tested it on my WAMP server. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
germ Posted August 16, 2011 Posted August 16, 2011 And be sure the new function is after the original one in the code. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
PupStar Posted August 16, 2011 Author Posted August 16, 2011 In the new function tep_draw_button2() remove this line of code: static $button_counter = 1; That made the code look like it will work when I tested it on my WAMP server. Jim, That was spot on! :thumbsup: Many Thanks :D Mark
Recommended Posts
Archived
This topic is now archived and is closed to further replies.