Author Topic: [Update/News] Info on V. 0.25 & V. 0.30  (Read 5015 times)

0 Members and 1 Guest are viewing this topic.

Offline Jeff

  • Global Moderator
  • Sr phpd Member
  • *****
  • Posts: 359
  • Karma: 5
  • Need help? Feel free to ask.
    • View Profile
[Update/News] Info on V. 0.25 & V. 0.30
« Reply #15 on: November 23, 2009, 03:58:57 AM »
Thank you
« Last Edit: November 24, 2009, 11:34:11 PM by Jeff »

Offline winracer

  • Development Team
  • Pro Member
  • *******
  • Posts: 446
  • Karma: 3
    • View Profile
    • helpmewithperl.com
  • Script Version: 1.0+
[Update/News] Info on V. 0.25 & V. 0.30
« Reply #16 on: November 23, 2009, 03:58:16 PM »
I have heard of Perl but don't really know what it's used for, can you explain what it does and maybe I can find something for you to code?


to program in perl
http://www.boutell.com/email/
to program in php
http://www.smartwebby.com/PHP/emailsending.asp


« Last Edit: November 24, 2009, 11:34:02 PM by Jeff »
winracer
myfunnypets.com
helpmewithperl.com
coosavalleyclassifieds.com
brownlows.net
myphpforum.com

Offline FireDart

  • Project Leader
  • Pro Member
  • *****
  • Posts: 406
  • Karma: 4
    • View Profile
    • FireDart
[Update/News] Info on V. 0.25 & V. 0.30
« Reply #17 on: November 23, 2009, 05:15:16 PM »
So Perl is used for E-Mail stuff?

Here is something you can do:
What would be nice is a E-Mail notification when a video is submitted, and maybe a newsletter too that can be written in the admin panel.

Going about that I have no idea thought.
« Last Edit: November 24, 2009, 11:33:49 PM by Jeff »

Offline Jeff

  • Global Moderator
  • Sr phpd Member
  • *****
  • Posts: 359
  • Karma: 5
  • Need help? Feel free to ask.
    • View Profile
[Update/News] Info on V. 0.25 & V. 0.30
« Reply #18 on: November 23, 2009, 05:41:49 PM »
Im also thinking... one of our main prioties after we get some updates out.. is upgrading the coding to php5 (this script is kinda outdated which makes coding and troubleshooting harder)
« Last Edit: November 24, 2009, 11:33:37 PM by Jeff »

Offline winracer

  • Development Team
  • Pro Member
  • *******
  • Posts: 446
  • Karma: 3
    • View Profile
    • helpmewithperl.com
  • Script Version: 1.0+
[Update/News] Info on V. 0.25 & V. 0.30
« Reply #19 on: November 23, 2009, 06:17:49 PM »
So Perl is used for E-Mail stuff?

Here is something you can do:
What would be nice is a E-Mail notification when a video is submitted, and maybe a newsletter too that can be written in the admin panel.

Going about that I have no idea thought.


I could work on that if you like. but perl is used for everything just like php. you can do anything with perl that you can do with php. http://en.wikipedia.org/wiki/Perl

perl is just a different programming language



sample to upload files you could use this in perl script http://articles.sitepoint.com/article/uploading-files-cgi-perl/1

Code: [Select]
file_upload.html



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <title>File Upload</title>
 </head>
 <body>
   <form action="/cgi-bin/upload.cgi" method="post"   
enctype="multipart/form-data">
     <p>Photo to Upload: <input type="file" name="photo" /></p>
     <p>Your Email Address: <input type="text" name="email_address" /></p>
     <p><input type="submit" name="Submit" value="Submit Form" /></p>
   </form>
 </body>
</html>


upload.cgi


#!/usr/bin/perl -wT 
 
use strict; 
use CGI; 
use CGI::Carp qw ( fatalsToBrowser ); 
use File::Basename; 
 
$CGI::POST_MAX = 1024 * 5000; 
my $safe_filename_characters = "a-zA-Z0-9_.-"; 
my $upload_dir = "/home/mywebsite/htdocs/upload"; 
 
my $query = new CGI; 
my $filename = $query->param("photo"); 
my $email_address = $query->param("email_address"); 
 
if ( !$filename ) 

 print $query->header ( ); 
 print "There was a problem uploading your photo (try a smaller file)."; 
 exit; 

 
my ( $name, $path, $extension ) = fileparse ( $filename, '\..*' ); 
$filename = $name . $extension; 
$filename =~ tr/ /_/; 
$filename =~ s/[^$safe_filename_characters]//g; 
 
if ( $filename =~ /^([$safe_filename_characters]+)$/ ) 

 $filename = $1; 

else 

 die "Filename contains invalid characters"; 

 
my $upload_filehandle = $query->upload("photo"); 
 
open ( UPLOADFILE, ">$upload_dir/$filename" ) or die "$!"; 
binmode UPLOADFILE; 
 
while ( <$upload_filehandle> ) 

 print UPLOADFILE; 

 
close UPLOADFILE; 
 
print $query->header ( ); 
print <<END_HTML; 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
 <head> 
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
   <title>Thanks!</title> 
   <style type="text/css"> 
     img {border: none;} 
   </style> 
 </head> 
 <body> 
   <p>Thanks for uploading your photo!</p> 
   <p>Your email address: $email_address</p> 
   <p>Your photo:</p> 
   <p><img src="/upload/$filename" alt="Photo" /></p> 
 </body> 
</html> 
END_HTML

« Last Edit: November 24, 2009, 11:33:29 PM by Jeff »
winracer
myfunnypets.com
helpmewithperl.com
coosavalleyclassifieds.com
brownlows.net
myphpforum.com

Offline Jeff

  • Global Moderator
  • Sr phpd Member
  • *****
  • Posts: 359
  • Karma: 5
  • Need help? Feel free to ask.
    • View Profile
[Update/News] Info on V. 0.25 & V. 0.30
« Reply #20 on: November 23, 2009, 06:22:42 PM »
Hmmm maybe we could start the rebuild of this script :)
« Last Edit: November 24, 2009, 11:33:19 PM by Jeff »

Offline FireDart

  • Project Leader
  • Pro Member
  • *****
  • Posts: 406
  • Karma: 4
    • View Profile
    • FireDart
[Update/News] Info on V. 0.25 & V. 0.30
« Reply #21 on: November 23, 2009, 07:07:33 PM »
Hmmm maybe we could start the rebuild of this script :)

Maybe..

An upload feature is a demanding feature people have been asking for.
« Last Edit: November 24, 2009, 11:33:09 PM by Jeff »

Offline winracer

  • Development Team
  • Pro Member
  • *******
  • Posts: 446
  • Karma: 3
    • View Profile
    • helpmewithperl.com
  • Script Version: 1.0+
[Update/News] Info on V. 0.25 & V. 0.30
« Reply #22 on: November 23, 2009, 07:12:07 PM »
Hmmm maybe we could start the rebuild of this script :)

Maybe..

An upload feature is a demanding feature people have been asking for.

I could look at adding a upload or a e-mail feature if you like.
« Last Edit: November 24, 2009, 11:33:01 PM by Jeff »
winracer
myfunnypets.com
helpmewithperl.com
coosavalleyclassifieds.com
brownlows.net
myphpforum.com

Offline winracer

  • Development Team
  • Pro Member
  • *******
  • Posts: 446
  • Karma: 3
    • View Profile
    • helpmewithperl.com
  • Script Version: 1.0+
[Update/News] Info on V. 0.25 & V. 0.30
« Reply #23 on: November 23, 2009, 08:44:57 PM »
this will work version .01

edit option.tpl

add
Code: [Select]
Admin E-mail<br/>
<input name="email" type="text" value="{$options[options].email}" size="30" maxlength="200" />
<br />
<br />


like
Code: [Select]
{section name=options loop=$options}</p>
<p align="center"> {$LAN_33}<br />
<input name="name" type="text" value="{$options[options].name}" size="30" maxlength="200" />
<br />
<br />
Admin E-mail<br/>
<input name="email" type="text" value="{$options[options].email}" size="30" maxlength="200" />
<br />
<br />


{$LAN_67}<br />
<textarea name="news" cols="30" rows="2">{$options[options].news}</textarea>
<br />
<br />


edit the options.php

add
Code: [Select]
mysql_query("UPDATE pp_config SET email = '$_POST[email]'");


like
Code: [Select]
mysql_query("UPDATE pp_config SET name = '$_POST[name]'");
mysql_query("UPDATE pp_config SET email = '$_POST[email]'");
mysql_query("UPDATE pp_config SET news = '$_POST[news]'");

   


add new database field call email under pp_config





then
edit
submit.php
add this above the
   exit;
}
?>
 at the end
Code: [Select]
// Your email address
$email = "YOUR_EMAIL ADDRESS";

// The subject
$subject = "Some just posted on your site";

// The message
$message = " Some just posted on your site";

mail($email, $subject, $message, "From: $email");

//echo "The email has been sent to $email.";


}


I still have to tie the $email address to the email address in the database



   
« Last Edit: November 24, 2009, 11:32:51 PM by Jeff »
winracer
myfunnypets.com
helpmewithperl.com
coosavalleyclassifieds.com
brownlows.net
myphpforum.com

Offline Chris (krissy)

  • Project Leader
  • Sr phpd Member
  • *****
  • Posts: 219
  • Karma: 1000
    • View Profile
    • PHPDirector
[Update/News] Info on V. 0.25 & V. 0.30
« Reply #24 on: November 23, 2009, 10:14:24 PM »
Far to offtopic here.
« Last Edit: November 24, 2009, 11:32:37 PM by Jeff »

Offline winracer

  • Development Team
  • Pro Member
  • *******
  • Posts: 446
  • Karma: 3
    • View Profile
    • helpmewithperl.com
  • Script Version: 1.0+
[Update/News] Info on V. 0.25 & V. 0.30
« Reply #25 on: November 24, 2009, 12:44:25 AM »
can you move to a different topic then. where do you want me to post? Would you like me to start on a upload script?
« Last Edit: November 24, 2009, 11:32:25 PM by Jeff »
winracer
myfunnypets.com
helpmewithperl.com
coosavalleyclassifieds.com
brownlows.net
myphpforum.com

Offline winracer

  • Development Team
  • Pro Member
  • *******
  • Posts: 446
  • Karma: 3
    • View Profile
    • helpmewithperl.com
  • Script Version: 1.0+
[Update/News] Info on V. 0.25 & V. 0.30
« Reply #26 on: November 24, 2009, 03:12:44 AM »
Does anyone know how i call the email option?
« Last Edit: November 24, 2009, 11:32:12 PM by Jeff »
winracer
myfunnypets.com
helpmewithperl.com
coosavalleyclassifieds.com
brownlows.net
myphpforum.com

Offline Chris (krissy)

  • Project Leader
  • Sr phpd Member
  • *****
  • Posts: 219
  • Karma: 1000
    • View Profile
    • PHPDirector
[Update/News] Info on V. 0.25 & V. 0.30
« Reply #27 on: November 24, 2009, 01:01:30 PM »
In no way we can use perl in the script.
« Last Edit: November 24, 2009, 11:32:03 PM by Jeff »

Offline winracer

  • Development Team
  • Pro Member
  • *******
  • Posts: 446
  • Karma: 3
    • View Profile
    • helpmewithperl.com
  • Script Version: 1.0+
[Update/News] Info on V. 0.25 & V. 0.30
« Reply #28 on: November 24, 2009, 01:25:57 PM »
the e-mail part is not perl it is php. I was just explaining about perl, but you can
integrate them http://www.linuxjournal.com/article/9282
« Last Edit: November 24, 2009, 11:31:55 PM by Jeff »
winracer
myfunnypets.com
helpmewithperl.com
coosavalleyclassifieds.com
brownlows.net
myphpforum.com

Offline winracer

  • Development Team
  • Pro Member
  • *******
  • Posts: 446
  • Karma: 3
    • View Profile
    • helpmewithperl.com
  • Script Version: 1.0+
[Update/News] Info on V. 0.25 & V. 0.30
« Reply #29 on: November 24, 2009, 03:45:14 PM »
Does anyone know how i call the email option?


I am working on a upload script. Do you want the script to be able to upload photos? also like

//  Valid file extensions (images, word, excel, powerpoint)
$FileTypes =
  "/^\.(jpg|jpeg|gif|png|doc|docx|txt|rtf|pdf|xls|xlsx|
        ppt|pptx){1}$/i";
« Last Edit: November 24, 2009, 11:31:46 PM by Jeff »
winracer
myfunnypets.com
helpmewithperl.com
coosavalleyclassifieds.com
brownlows.net
myphpforum.com