1 (edited by nakome 2014-02-22 11:09:55)

Topic: myContact

Hello Friends i make myContact plugin but i have a problem, my hosting only have 5.2 version and i can test here, in my localhost i test and work well send mails to gmail.

Please if you like test plugin in your hosting  and tell me if work Download here

The plugin use PHPMailer ,ajax and use Bootstrap Modal for process ( if error or ok  show ),
you can see in myContact/lib folder and  you can configure this.

The file send.php in myContact/lib/send.php contains the data of email you need configure this to work.

Activate plugin in config.php and call with     

<?php Morfy::factory()->runAction('myContact'); ?>

Thank's and Sorry for my english smile

..::: Moncho Varela ::::..   ..::: @Nakome ::::..   ..::: Github ::::..

Re: myContact

Thanks for this Plugin! )
I have update it.

myContact 1.0.1
* Security Token Added

Download: myContact.1.0.1.zip

Monstra Loves You! Give some love back!

Re: myContact

Nice master smile

..::: Moncho Varela ::::..   ..::: @Nakome ::::..   ..::: Github ::::..

Re: myContact

there was small mistake. archive repacked. please download again

Monstra Loves You! Give some love back!

Re: myContact

wink

..::: Moncho Varela ::::..   ..::: @Nakome ::::..   ..::: Github ::::..

6 (edited by Aryandhani 2014-01-29 08:48:58)

Re: myContact

good job bro!

now you have to make comments plugin and pagination jeje..

I'm not like them but I can pretend.

7 (edited by nakome 2014-01-29 22:15:58)

Re: myContact

hehe for comments i need database hehe but i try with json  and pagination no problem

try this:

For number  of pages you can use

Morfy::$config['num_of_pages']; 

and add

 'num_of_pages' => 4  

in config.php.

Remplace this code:

<?php
    $posts = Morfy::factory()->getPages(CONTENT_PATH . '/blog/', 'date', 'DESC', array('404','index'));
    foreach($posts as $post) {
        echo '<h3><a href="'.$config['site_url'].'/blog/'.$post['slug'].'">'.$post['title'].'</a></h3>                
        <p>Posted on '.$post['date'].'</p>    
        <div>'.$post['content_short'].'</div>';
    }
?>

For this:

 <?php

      // Blog with pagination 
    $posts = Morfy::factory()->getPages(CONTENT_PATH . '/blog/', 'date', 'DESC', array('404','index'));
    // Count posts
    $total_data = count($posts);
    // show only this num of posts
    $num_of_pages = Morfy::$config['num_of_pages'];    // write in config.php 'num_of_pages' => 2
    // get page
    $page = intval($_GET['page']);        
    // if empty or 1
    if(empty($page) || $page==1) {
        $start_val = 0;
        $end_val = $num_of_pages - 1;
    }else {
        $start_val = ($page * $num_of_pages) - $num_of_pages;
        $end_val = $start_val + ($num_of_pages - 1);
    }
    // loop content
    for($i=$start_val;$i<=$end_val;$i++){ 
        echo '<h3><a href="'.$config['site_url'].'/blog/'.$posts[$i]['slug'].'">'.$posts[$i]['title'].'</a></h3>
        <p>Posted on '.$posts[$i]['date'].'</p>    
        <div>'.$posts[$i]['content_short'].'</div>';
    }
    
     // pagination 
    $less_than = $total_data/$num_of_pages;
    
    // i++
    if($less_than>intval($less_than)) $less_than = $less_than + 1;
    
    // if is more than 1
    if($total_data>1) {

        echo '<ul class="pagination">';

        echo ($page-1)>0?'<li><a href="?page='.($page-1).'">Previous</a></li>':'';

        for($i=1;$i<=$less_than;$i++){
            if($page==$i){
                  echo '<li class="active"><a>'.$i.'</a></li>';
            }else{ 
                echo '<li><a href="?page='.$i.'">'.$i.'</a></li>';
            }
        }
        echo ($page+1)<=$less_than?'<li><a href="?page='.($page+1).'">Next</a></li>':'';

        echo '</ul>';
    }
?>
..::: Moncho Varela ::::..   ..::: @Nakome ::::..   ..::: Github ::::..

Re: myContact

hehe thanks bro. you did great big_smile

I'm not like them but I can pretend.

Re: myContact

nakome wrote:

Hello Friends i make myContact plugin but i have a problem, my hosting only have 5.2 version and i can test here, in my localhost i test and work well send mails to gmail.

Please if you like test plugin in your hosting  and tell me if work Download here

The plugin use PHPMailer ,ajax and use Bootstrap Modal for process ( if error or ok  show ),
you can see in myContact/lib folder and  you can configure this.

The file send.php in myContact/lib/send.php contains the data of email you need configure this to work.

Activate plugin in config.php and call with     

<?php Morfy::factory()->runAction('myContact'); ?>

Thank's and Sorry for my english smile

hi bro
I have a problem I do not receive any email
http://s15.postimg.org/q99bn6mnv/contact_problem.png

Re: myContact

Hi dextra Tomorrow my hosting migrate to php 5.3 and i can test on my server. smile

..::: Moncho Varela ::::..   ..::: @Nakome ::::..   ..::: Github ::::..

Re: myContact

http://www.wampserver.com/en/#download-wrapper php 5.3 wampserver smile

Re: myContact

Hehe i have Uniserver for localhost  and working well the plugin but you need configure msmtp first.

..::: Moncho Varela ::::..   ..::: @Nakome ::::..   ..::: Github ::::..

Re: myContact

nakome wrote:

Hi dextra Tomorrow my hosting migrate to php 5.3 and i can test on my server. smile

I have a problem I do not receive any email

hi nakome
I'm still in awaiting you can fix it;
tnx

Re: myContact

Sorry I forgot ,  I go to send mail to my hosting now.

..::: Moncho Varela ::::..   ..::: @Nakome ::::..   ..::: Github ::::..

15 (edited by nakome 2014-02-22 11:13:42)

Re: myContact

I Update plugin, there are a problem to send menssage, because  send to same user mail hehe.

I make web to test plugins and work good Morfy demo

Download here or in top


plugins/myContact/lib/send.php line 48

         // Bad
    $mail = new PHPMailer();
    $mail->IsHTML(true);
    $mail->CharSet = 'utf-8';
    $mail->ContentType = 'text/html';
    $mail->From = $my_email;  // ups is $user_mail
    $mail->FromName = $my_name;  // ups is $user_name
    $mail->Subject = $user_subject;
    $mail->AddAddress($user_email);  // ups is $my_mail
    $mail->MsgHTML($html);
    $mail->Send();
        
        // Good
    $mail = new PHPMailer();
    $mail->IsHTML(true);
    $mail->CharSet = 'utf-8';
    $mail->ContentType = 'text/html';
    $mail->From = $user_email;
    $mail->FromName = $user_name;
    $mail->Subject = $user_subject;
    $mail->AddAddress($my_email); 
    $mail->MsgHTML($html);
    $mail->Send();
..::: Moncho Varela ::::..   ..::: @Nakome ::::..   ..::: Github ::::..

Re: myContact

Massages dont's comes on my email. Only in admin panel. How to get this function back?
And it's hard to add attache for this form? smile

Re: myContact

See your hosting I had problems with my hosting email,I had put the hosting mail and redirect to my normal  mail.

..::: Moncho Varela ::::..   ..::: @Nakome ::::..   ..::: Github ::::..

Re: myContact

thx for answer! Will try use redirect. But i think it can be fixed in code...

Re: myContact

hi
how can I add new fields;

look here

thanks

Re: myContact

like this html form guide is a good contact form example and you can use with iframe see the code to understand.

..::: Moncho Varela ::::..   ..::: @Nakome ::::..   ..::: Github ::::..

Re: myContact

Can you please help me;

Re: myContact

This is very ease contact form you only need edit mail in contactform.php and ad with

<iframe src="folder of contactform.php file"></iframe>
..::: Moncho Varela ::::..   ..::: @Nakome ::::..   ..::: Github ::::..

Re: myContact

Nice one @nakome.

Here is another way also you can style your iframe

No Scrolling with 500px

<iframe id="contactform" src="location goes here" style="width:100%; height:500px;" frameborder="0" scrolling="no"></iframe>

Scrolling with 500px

<iframe id="contactform" src="location goes here" style="width:100%; height:500px;" frameborder="0" scrolling="yes"></iframe>

If you place (style="width:100%;) in your iframe it matches your design and covers 100% of your page

wink

http://monstracreative.com - themes, plugins and snippets for monstra cms

:: ATTENTION ::
Need help? Login at your account at: http://monstracreative.com/users/login. -> You have a excellent support center at our website! wink

Re: myContact

why do iframe?
I want to make a contact form like that which is above!

Re: myContact

Hey @dextra.

You still make like you want it, but using iframe is much easier for you and all of us.

To link to your form do this:

1 - Create your form in php files and test it
2 - Place it inside of your website and test again
3 - Create a iframe to call your files in the location you want, just one is enough!
4 - Test your form with your website, should work just fine.

Example:

<iframe id="contactform" src="location goes here" style="width:100%; height:500px;" frameborder="0" scrolling="no"></iframe>

Its simple and easy to use!

wink

http://monstracreative.com - themes, plugins and snippets for monstra cms

:: ATTENTION ::
Need help? Login at your account at: http://monstracreative.com/users/login. -> You have a excellent support center at our website! wink