test
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • Manos Moderator
    #161649

    I guess this can be easy for someone but it looks like that my poor skills are not enough for this.

    I want to connect this code

    <form id="form-subscribe">
    <p><label for="subscribe-name"><input class="subscribe-name" name="subscribe-name" type="text" value="Το Όνομά σας" onfocus="if (this.value == 'Your name') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Your name';}" /></label></p>
    <p><label for="subscribe-email"><input class="subscribe-email" name="subscribe-email" type="text" value="Email" onfocus="if (this.value == 'Email') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Email';}"/></label></p>
    <input type="submit" value="Εγγραφή" class="button" />
    </form>

    With ccnewsletter to add a Subscriber is this possible ?

    thangnn1510 Friend
    #382462

    Dear pascm!

    Could you give us the link to CCNewsletter site?

    Regards!

    Manos Moderator
    #382769

    Hi,

    thank you for your answer you can find the site i build here -> http://www.pascm.gr/npaideia/

    Best Regards

    Manos

    Phill Moderator
    #382771

    What thangnn1510 is asking is for a link to the ccnewsletter site. We need to see the component that you want to put your code in so we can try to help.Your code could be very valid or completely off the mark but unless we see exactly where and why it is going to be very hard to assist.

    Manos Moderator
    #382772

    Oh Sorry i didn’t realized that! If i enable ccnewsletter module (i just did on pos right) will that be fine?

    Thanks!

    Phill Moderator
    #382777

    I think you miss-understand. Where do we get a copy of ccnewsletter?

    Manos Moderator
    #382778

    Hi, phill my English are realy bad sorry !

    Here you can download a free copy of ccnewsletter -> http://www.chillcreations.com/joomla-extension-downloads/categories/3.html

    P.S. Is this what you wanted ?

    thangnn1510 Friend
    #382799

    Dear Pascm!

    The CCnewsletter has its own module with html code like your custom module, please enable it in adminsitrator -> extensions -> module magager: ccNewsletter. You could see it in my screenshot.

    Regards!


    1. 3-23-2011-10-01-54-AM
    Manos Moderator
    #382918

    Yes but i can’t style it like the perfect custom html that you have on demo 🙁

    thangnn1510 Friend
    #382955

    Dear Pascm!

    You should change its CLASS and ID name in modulesmod_ccnewslettertmpldefault.php and place it to the possition you want. You should have perfect custom HTML like our demo. The code in default.php:

    <?php
    /**
    * @package ccNewsletter
    * @version 1.0.9
    * @author Chill Creations <info@chillcreations.com>
    * @link http://www.chillcreations.com
    * @copyright Copyright (C) 2008 - 2010 Chill Creations-All rights reserved
    * @license GNU/GPL, see LICENSE.php for full license.
    * See COPYRIGHT.php for more copyright notices and details.

    This file is part of ccNewsletter.
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version 2
    of the License.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.
    **/

    // no direct access
    defined('_JEXEC') or die('Restricted access');
    /* Import newsletter css */
    JHTML::stylesheet('newsletter.css', JURI::base() . '/modules/mod_ccnewsletter/assets/');
    $unsubscribe = $parameters['unsubscribe_button'];
    $terms = $parameters['showterm_text'];

    $id = $parameters['article'];
    $cid='index.php?option=com_content&view=article&id='.$id.'&tmpl=component';
    $popuptype = $parameters['popuptype'];

    if($subscribe_flag == 'u')
    {
    ?>
    <div class="mainnewsletter">
    <p><?php echo $parameters['introduction']; ?></p>
    <br/>
    <form action="<?php echo JRoute::_( 'index.php?option=com_ccnewsletter&view=unsubscribe', true, 0); ?>" method="post" name="subscribeForm" id="subscribeForm">
    <input type="hidden" name="email" id="email" value="<?php echo $email; ?>" />
    <center><input class="button" type="submit" name="submit" value="<?php echo $parameters['unsubscribe']; ?>" /></center>
    <div class="clr"></div>
    <input type="hidden" name="option" value="com_ccnewsletter" />
    <input type="hidden" name="task" value="removeSubscriberByEmail" />
    </form>
    <br/>
    </div>
    <?php
    }
    else
    {
    ?>
    <script type="text/javascript">
    function formsubmit(task)
    {
    var form = document.subscribeFormModule;
    if(task == "addSubscriber")
    {
    if(form.name.value== "")
    {
    alert('<?php echo $parameters['namewarning']; ?>');
    }
    else if(form.email.value == "")
    {
    alert('<?php echo $parameters['emailwarning']; ?>');
    }
    else if(( form.email.value.search("@") == -1) || ( form.email.value.search("[.*]" ) == -1 ))
    {
    alert('<?php echo $parameters['emailwarning']; ?>');
    }

    <?php if($parameters['showterm'])
    {
    ?>
    else if(form.terms_condition_ch.checked == false)
    {
    alert ('<?php echo $parameters['terms_cond_warn']; ?>');

    }
    <?php
    }
    ?>

    else
    {
    form.task.value = "addSubscriber";
    form.submit();
    }
    }
    else if(task == "removeSubscriberByEmail")
    {
    if(form.email.value == "")
    {
    alert('<?php echo $parameters['emailwarning']; ?>');
    }
    else if(( form.email.value.search("@") == -1) || ( form.email.value.search("[.*]" ) == -1 ))
    {
    alert('<?php echo $parameters['emailwarning']; ?>');
    }
    else
    {
    form.task.value = "removeSubscriberByEmail";
    form.submit();
    }
    }
    }
    </script>

    <?php
    if($parameters['showterm'])
    {
    if($popuptype)
    {
    JHTML::_('behavior.modal', 'a.modal');
    }
    else
    {
    ?>
    <script type="text/javascript">
    function newPopup(url)
    {
    popupWindow = window.open(url,'popUpWindow','height=700,width=800,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no,status=no')
    }
    </script>
    <?php
    }
    }

    /* Import css and js for appropriate stye selected from parameter */
    if($parameters['style']== 'mootools')
    {
    JHTML::script('mootools.js', JURI::base() .'/media/system/js/');
    ?>
    <script type="text/javascript">
    window.addEvent('load', function(){
    var mySlide = new Fx.Slide('subscribelayout');
    mySlide.hide();
    $('toggle').addEvent('click', function(e){
    e = new Event(e);
    mySlide.toggle();
    e.stop();
    });
    });
    </script>
    <div class="mainnewsletter">
    <p><?php echo $parameters['introduction'] ?></p>
    <div class="newsletterbutton">
    <p><a id="toggle" href="#"><?php echo $title; ?></a></p>
    </div>
    <div id="subscribelayout">
    <form action="<?php echo JRoute::_('index.php?option=com_ccnewsletter&view=ccnewsletter');?>" method="post" name="subscribeFormModule" id="subscribeFormModule">
    <p><div>
    <?php echo $parameters['name']; ?>:

    <input type="text" name="name" id="name" size="15" maxlength="35" value="<?php echo $name; ?>" />
    </div>
    </p>
    <p>
    <div>
    <?php echo $parameters['email']; ?>:

    <input type="text" name="email" id="email" size="15" maxlength="60" value="<?php echo $email; ?>" />
    </div>
    </p>

    <?php if($parameters['showterm'])
    {
    if($id!="0")
    {
    if($popuptype)
    {
    ?>
    <p>
    <input id="ccnewsletter" name="terms_condition_ch" class="inputbox" type="checkbox">
    <a style="font-size:14px;color:#4E4E51;margin:0px 0px 0px 5px;text-decoration:none;" href='<?php echo $cid; ?>' class="modal" rel="{handler: 'iframe', size: {x: 700, y: 375}}"><?php echo $terms;?></a>
    </p>
    <?php
    }
    else
    {
    ?>
    <p>
    <input id="ccnewsletter" name="terms_condition_ch" class="inputbox" type="checkbox">
    <a style="font-size:14px;color:#4E4E51;margin:0px 0px 0px 5px;text-decoration:none;" href="JavaScript:newPopup('<?php echo JRoute::_('modules/mod_ccnewsletter/helper/popup.php?id='.$id)?>');"><?php echo $terms;?></a>
    <p>
    <?php
    }
    }
    }
    ?>
    <?php
    if($unsubscribe)
    {
    ?>
    <p>
    <input class="button" type="button" id="addSubscriber" name="addSubscriber" value="<?php echo $parameters['subscribe']; ?>" onclick="formsubmit('addSubscriber');"/>
    <input class="button" type="button" id="removeSubscriberByEmail" name="removeSubscriberByEmail" value="<?php echo $parameters['unsubscribe']; ?>" onclick="formsubmit('removeSubscriberByEmail');"/>
    </p>
    <?
    }
    else
    {
    ?>
    <p><input class="button" type="button" id="addSubscriber" name="addSubscriber" value="<?php echo $parameters['subscribe']; ?>" onclick="formsubmit('addSubscriber');"/></p>
    <?php
    }
    ?>
    <input type="hidden" name="option" value="com_ccnewsletter" />
    <!--<input type="hidden" name="task" value="addSubscriber" />-->
    <input type="hidden" name="task" value="" />
    </form>
    </div>
    </div>
    <?php
    }
    else if($parameters['style']== 'highslide')
    {
    JHTML::script('highslide-with-html.js', JURI::base() .'/modules/mod_ccnewsletter/assets/');
    JHTML::stylesheet('highslide.css', JURI::base() . '/modules/mod_ccnewsletter/assets/');
    ?>
    <script type="text/javascript">
    hs.graphicsDir = '<?php echo JURI::base() ?>/modules/mod_ccnewsletter/assets/graphics/';
    hs.outlineType = 'rounded-white';
    hs.outlineWhileAnimating = true;
    </script>
    <div class="mainnewsletter">
    <p><?php echo $parameters['introduction'] ?></p>
    <div class="newsletterbutton_highslide">
    <p><a href="#" onclick="return hs.htmlExpand(this, { contentId: 'highslide-html' } )" class="highslide"><?php echo $title; ?></a></p>
    </div>
    <br/>
    <div class="highslide-html-content" id="highslide-html">
    <div class="highslide-header">
    <table border="0" width="100%">
    <tr>
    <td width="50%"></td>
    <td width="20%">
    <div class="highslide-move" >
    <a href="#" onclick="return false"><?php echo $parameters['move']; ?></a>
    </div>
    </td>
    <td width="28%">
    <div class="highslide-close" style="float:left;" >
    <a href="#" onclick="return hs.close(this)"><?php echo $parameters['close']; ?></a>
    </div>
    </td>
    </tr>
    </table>
    </div>
    <div class="highslide-body">
    <form action="<?php echo JRoute::_('index.php?option=com_ccnewsletter&view=ccnewsletter');?>" method="post" name="subscribeFormModule" id="subscribeFormModule">
    <p><div>
    <?php echo $parameters['name']; ?>:
    <input type="text" name="name" id="name" size="15" maxlength="35" value="<?php echo $name; ?>" />
    </div>
    </p>
    <p>
    <div>
    <?php echo $parameters['email']; ?>:
    <input type="text" name="email" id="email" size="15" maxlength="60" value="<?php echo $email; ?>" />
    </div>
    </p>
    <?php if($parameters['showterm'])
    {
    if($id!="0")
    {
    if($popuptype)
    {
    ?>
    <p>
    <input id="ccnewsletter" name="terms_condition_ch" class="inputbox" type="checkbox">
    <a style="font-size:14px;color:#4E4E51;margin:0px 0px 0px 5px;text-decoration:none;" href='<?php echo $cid; ?>' class="modal" rel="{handler: 'iframe', size: {x: 700, y: 375}}"><?php echo $terms;?></a>
    </p>
    <?php
    }
    else
    {
    ?> <p>
    <input id="ccnewsletter" name="terms_condition_ch" class="inputbox" type="checkbox">
    <a style="font-size:14px;color:#4E4E51;margin:0px 0px 0px 5px;text-decoration:none;" href="JavaScript:newPopup('<?php echo JRoute::_('modules/mod_ccnewsletter/helper/popup.php?id='.$id)?>');"><?php echo $terms;?></a>
    </p>
    <?php
    }
    }
    }
    if($unsubscribe)
    {
    ?>
    <p>
    <input class="button" type="button" id="addSubscriber" name="addSubscriber" value="<?php echo $parameters['subscribe']; ?>" onclick="formsubmit('addSubscriber');"/>
    <input class="button" type="button" id="removeSubscriberByEmail" name="removeSubscriberByEmail" value="<?php echo $parameters['unsubscribe']; ?>" onclick="formsubmit('removeSubscriberByEmail');"/>
    </p>
    <?php
    }
    else
    {
    ?>
    <P>
    <center><input class="button" type="button" id="addSubscriber" name="addSubscriber" value="<?php echo $parameters['subscribe']; ?>" onclick="formsubmit('addSubscriber');"/></center>
    </p>
    <?php
    }
    ?>
    <input type="hidden" name="option" value="com_ccnewsletter" />
    <!--<input type="hidden" name="task" value="addSubscriber" />-->
    <input type="hidden" name="task" value="" />
    </form>
    </div>
    <div class="highslide-footer">
    <div>
    <span class="highslide-resize" title="Resize">
    <span></span>
    </span>
    </div>
    </div>
    </div>
    </div>
    <?php
    }
    else
    {
    ?>
    <div class="mainnewsletter">
    <p><?php echo $parameters['introduction'] ?></p>
    <div class="normalsublayout">
    <form action="<?php echo JRoute::_('index.php?option=com_ccnewsletter&view=ccnewsletter');?>" method="post" name="subscribeFormModule" id="subscribeFormModule">
    <p><div>
    <?php echo $parameters['name']; ?>:
    <input type="text" name="name" id="name" size="15" maxlength="35" value="<?php echo $name; ?>" />
    </div>
    </p>
    <p>
    <div>
    <?php echo $parameters['email']; ?>:
    <input type="text" name="email" id="email" size="15" maxlength="60" value="<?php echo $email; ?>" />
    </div>
    </p>
    <?php if($parameters['showterm'])
    {
    if($id!="0")
    {
    if($popuptype)
    {
    ?>
    <p>
    <input id="ccnewsletter" name="terms_condition_ch" class="inputbox" type="checkbox">
    <a style="font-size:14px;color:#4E4E51;margin:0px 0px 0px 5px;text-decoration:none;" href='<?php echo $cid; ?>' class="modal" rel="{handler: 'iframe', size: {x: 700, y: 375}}"><?php echo $terms;?></a>
    </p>
    <?php
    }
    else
    {
    ?>
    <p>
    <input id="ccnewsletter" name="terms_condition_ch" class="inputbox" type="checkbox">
    <a style="font-size:14px;color:#4E4E51;margin:0px 0px 0px 5px;text-decoration:none;" href="JavaScript:newPopup('<?php echo JRoute::_('modules/mod_ccnewsletter/helper/popup.php?id='.$id)?>');"><?php echo $terms;?></a>
    </p>
    <?php
    }
    }
    }
    if($unsubscribe)
    {
    ?>
    <p>
    <input class="button" type="button" id="addSubscriber" name="addSubscriber" value="<?php echo $parameters['subscribe']; ?>" onclick="formsubmit('addSubscriber');"/>
    <input class="button" type="button" id="removeSubscriberByEmail" name="removeSubscriberByEmail" value="<?php echo $parameters['unsubscribe']; ?>" onclick="formsubmit('removeSubscriberByEmail');"/>
    </p>
    <?php
    }
    else
    {
    ?>
    <p><center><input class="button" type="button" id="addSubscriber" name="addSubscriber" value="<?php echo $parameters['subscribe']; ?>" onclick="formsubmit('addSubscriber');"/></center></p>
    <!--<p><center><input type="image" src="images/back_f2.png" id="addSubscriber" name="addSubscriber" value="<?php echo $parameters['subscribe']; ?>" onclick="formsubmit('addSubscriber');"/></center></p>-->
    <?php
    }
    ?>
    <input type="hidden" name="option" value="com_ccnewsletter" />
    <!--<input type="hidden" name="task" value="addSubscriber" />-->
    <input type="hidden" name="task" value="" />
    </form>
    </div>
    </div>
    <?php
    }
    }
    ?>

    Regards!

    uzvezda Friend
    #384783

    But if I stay by your custom html

    <p style="margin: 0;">Subscribe to our e-Updates and keep abreast of our portal news.</p>
    <form id="form-subscribe" action="index.php" method="post">
    <p><label for="subscribe-name"><input class="subscribe-name" name="subscribe-name" type="text" value="Your name" /></label></p>
    <p><label for="subscribe-email"><input class="subscribe-email" name="subscribe-email" type="text" value="Email" /></label></p>
    <input class="button" type="submit" value="Subscribe" /> </form>

    Where it goes names and emails? according to action it only open an index.php. I understand that I can write whatever page, but where it post it or subsscribe it. Where do I need to set it work properly.

    thank you.

    thangnn1510 Friend
    #385338

    Hi uzvezda!

    This code isn’t correct, pascm want to ask to connect it to CCnewsletter. Please follow my answers.

    Regards!

Viewing 12 posts - 1 through 12 (of 12 total)

This topic contains 12 replies, has 4 voices, and was last updated by  thangnn1510 13 years, 8 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum