You have a PHP category and an RSS/Atom feed just for that.
You already made some posts about PHP.
It's an advantage, if you are a PHP or PEAR developer.
@@ -41,6 +40,16 @@ the textarea below, why you think, we should include your blog :)
(to the PHP cat only)
Why should your blog be on Planet PHP:
+
+What does your blog provide:
+ General web stuff
+ Beginner PHP tutorials
+ JavaScript stuff
+ Professional PHP development
+ Stuff about PHP internals
+ Information on HTML and CSS
+ Advanced PHP programming topics
+
diff --git a/public/submit/index.php b/public/submit/index.php
index 59f013e..2965c83 100644
--- a/public/submit/index.php
+++ b/public/submit/index.php
@@ -2,7 +2,7 @@
$dom = new domdocument();
$xsl = new domdocument();
-$xsl->load("../themes/planet-php/static.xsl");
+$xsl->load(dirname(__FILE__) . "/../themes/planet-php/static.xsl");
$xslt = new xsltprocessor();
@@ -16,7 +16,8 @@
}
$spam = false;
-if ( !empty($_POST['name']) && !empty($_POST['firstname']) && !empty($_POST['url']) && !empty($_POST['description'])) {
+if ( !empty($_POST['name']) && !empty($_POST['firstname']) && !empty($_POST['url']) && !empty($_POST['description'])
+ && ( !empty($_POST['provide_advanced']) || !empty($_POST['provide_profi']) || !empty($_POST['provide_internals']) ) ) {
foreach($_POST as $key => $value) {
$_POST[$key] = trim($value);
@@ -41,7 +42,7 @@
die("From is invalid.");
}
- include "../inc/config.inc.php";
+ include dirname(__FILE__) . "/../../inc/config.inc.php";
include "MDB2.php";
if (!$spam) {
@@ -77,7 +78,7 @@
mail(PROJECT_ADMIN_EMAIL, "[" . PROJECT_NAME_HR . "] (Rejected) New submission for ". $_POST['url'], $mailtext,$header);
} else {
//mail("chregu@liip.ch","New Planet PHP submission for ". $_POST['url'], $mailtext,$header);
- mail(PROJECT_ADMIN_URL, "[" . PROJECT_NAME_HR . "] New submission for ". $_POST['url'], $mailtext,$header);
+ mail(PROJECT_ADMIN_EMAIL, "[" . PROJECT_NAME_HR . "] New submission for ". $_POST['url'], $mailtext,$header);
}
if ($db && $db->isError($res)) {
@@ -90,7 +91,11 @@
} else {
if (count($_POST) > 0 ) {
- $xslt->setParameter("","error","Please fill in all fields");
+ if ( empty($_POST['name']) || empty($_POST['firstname']) || empty($_POST['url']) || empty($_POST['description']) ) {
+ $xslt->setParameter("","error","Please fill in all fields");
+ } else if ( empty($_POST['provide_advanced']) || empty($_POST['provide_profi']) || empty($_POST['provide_internals']) ) {
+ $xslt->setParameter("","error","Sorry, Planet-PHP only accepts advanced or professional PHP content or stuff about PHP internals.");
+ }
}
$dom->load("form.xml");
}
diff --git a/public/themes/planet-php/common.xsl b/public/themes/planet-php/common.xsl
index 8fbe458..e8d4f8b 100644
--- a/public/themes/planet-php/common.xsl
+++ b/public/themes/planet-php/common.xsl
@@ -15,7 +15,7 @@
-
+
@@ -51,7 +51,7 @@
-
+
@@ -97,11 +97,11 @@ Twitter account by Sepehr Laj