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 ::::..

nakome's Website

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 ::::..

nakome's Website

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 ::::..

nakome's Website

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 2014-01-29 19:00:08 (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 ::::..

nakome's Website

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

Re: myContact

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

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

nakome's Website

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 ::::..

nakome's Website

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 ::::..

nakome's Website

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 ::::..

nakome's Website