Author Topic: My version of 0.23 (unofficial)!  (Read 2656 times)

0 Members and 1 Guest are viewing this topic.

Offline Shave.

  • Development Team
  • Full phpd Member
  • *******
  • Posts: 80
  • Karma: 0
    • View Profile
    • PHPD Mods
My version of 0.23 (unofficial)!
« on: November 27, 2009, 12:55:06 AM »
Edit: Sorry forgot to say but if you find any bug let me know. ;D

PLEASE NOTE THIS IS IN NO WAY OFFICIAL!

As I've been made a dev I thought I'd share a little bit of my work with everyone, please do note this is my release so please note that its not official in any way but to be fair Its just the 0.22 script with some user friendlier features. I've got you a couple of screenshots and also a working demo so you can have a play, and if thats not enough then you can load it on your own site.

Demo

Front-End
http://www.phpdmods.com/vms/023/index.php

Back-End
http://www.phpdmods.com/vms/023/admin/index.php
(Username=admin  - password=password)

Download
http://www.phpdmods.com/vms/Phpdirector-0-23-Alpha(Unofficial).zip

http://www.phpdmods.com/vms/Phpdirector-0-236-Beta(Unofficial).zip


Screenshots






Please give me some honest feedback and also any more ideas you may have please let me know.

Thanks
« Last Edit: November 30, 2009, 11:50:49 PM by Shave. »

Offline FireDart

  • Project Leader
  • Pro Member
  • *****
  • Posts: 406
  • Karma: 4
    • View Profile
    • FireDart
Re: Unofficial 0.23 Alpha
« Reply #1 on: November 27, 2009, 06:31:05 PM »
Shave. thank you for all the hard work you have been doing,
I am currently redesigning the default template(Just getting started on the admin panel) and I am asking permission to use the options features you have added.

Do you mind if I use your code for an official release?

-FD

P.S: See you are using Modx CMS for your site, good choose. All my large PHP/MySql sites run on Modx and am still happy I use it. ;D
« Last Edit: November 27, 2009, 06:35:21 PM by FireDart »

Offline Shave.

  • Development Team
  • Full phpd Member
  • *******
  • Posts: 80
  • Karma: 0
    • View Profile
    • PHPD Mods
Re: Unofficial 0.23 Alpha
« Reply #2 on: November 27, 2009, 07:43:53 PM »
Thanks for the feedback, and feel free to use any part or all the code if you like, but I'm going to be adding to it and sorting it all out hopefully tonight so I'll release a 2.31 Alpha later on if I get the time.

Offline Shave.

  • Development Team
  • Full phpd Member
  • *******
  • Posts: 80
  • Karma: 0
    • View Profile
    • PHPD Mods
Re: My version of 0.231 Alpha (unofficial)!
« Reply #3 on: November 28, 2009, 02:11:18 AM »
I said I'd do it if I had the time and I did, this is the 2.31 Alpha release of it, please do note there are no security hole or anything on this as its just a modded 0.22 script but its Alpha because I want to develope it more before I give it the all clear. Again if you run into any bug please let me no.

Changes:

the only changes are to the admin panel and If you take a look either on the demo or on the screenshots your be sure that I've revamped it complety.






http://www.phpdmods.com/vms/023/admin/index.php

(username- admin    password- password)

Download It

http://www.phpdmods.com/vms/Phpdirector-0-231-Alpha(Unofficial).zip

My next release will be 0.232 Alpha and the improvements I have planned is improving the look of the installer which shouldnt be to hard. :) also if anyone has any requests then just let me know so I can try and include them.

Offline Shave.

  • Development Team
  • Full phpd Member
  • *******
  • Posts: 80
  • Karma: 0
    • View Profile
    • PHPD Mods
Re: My version of 0.231 Alpha (unofficial)!
« Reply #4 on: November 28, 2009, 03:46:22 AM »
I said I'd do it if I had the time and I did, this is the 2.31 Alpha release of it, please do note there are no security hole or anything on this as its just a modded 0.22 script but its Alpha because I want to develope it more before I give it the all clear. Again if you run into any bug please let me no.

Changes:

the only changes are to the admin panel and If you take a look either on the demo or on the screenshots your be sure that I've revamped it complety.






http://www.phpdmods.com/vms/023/admin/index.php

(username- admin    password- password)

Download It

http://www.phpdmods.com/vms/Phpdirector-0-231-Alpha(Unofficial).zip

If anyone has any requests then just let me know so I can try and include them.

Update;

Installation template updated to fit with admin panel


Offline FireDart

  • Project Leader
  • Pro Member
  • *****
  • Posts: 406
  • Karma: 4
    • View Profile
    • FireDart
Re: My version of 0.23 (unofficial)!
« Reply #5 on: November 28, 2009, 08:15:06 PM »
Hey Shave.,
I need help with some extra fields in PHPD.

1) I added the fields in the Options Menu in the Admin Panel.
2) Edited the admin/options.tpl file so it had the extra fields
3) Added The MySql Tables
4) When I edit the options thought the Admin Options Menu it changes the info in the MySql DB

The Problem:
It does not change the info on the site. Got any idea?

My Code:
Options.tpl
Code: [Select]
<form action="options.php?pt=options&amp;pag=options" method="post" style="width: 600px;">
{section name=options loop=$options}
  <div>
<table class="optionsform" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<!--Site Name-->
<tr>
<td class="first" width="172"><strong>{$LAN_33}</strong></td>
<td class="last"><input name="name" type="text" value="{$options[options].name}" size="70" maxlength="200" /></td>
</tr>
<!--Logo-->
<tr>
<td class="first"><strong>Logo</strong></td>
<td class="last"><input name="logo" type="text" value="{$options[options].logo}" size="70" maxlength="200" /></td>
</tr>
<!--Logo Alt-->
<tr>
<td class="first"><strong>Logo Alt</strong></td>
<td class="last"><input name="alt" type="text" value="{$options[options].alt}" size="70" maxlength="200" /></td>
</tr>
<!--Favicon-->
<tr>
<td class="first"><strong>Favicon</strong></td>
<td class="last"><input name="favicon" type="text" value="{$options[options].favicon}" size="70" maxlength="200" /></td>
</tr>
<!--Slogan-->
<tr>
<td class="first"><strong>Slogan</strong></td>
<td class="last"><input name="slogan" type="text" value="{$options[options].slogan}" size="70" maxlength="200" /></td>
</tr>
<!--News-->
<tr>
<td class="first"><strong>{$LAN_67}</strong></td>
<td class="last"><textarea name="news" cols="67" rows="2">{$options[options].news}</textarea></td>
</tr>
<!--Footer-->
<tr>
<td class="first"><strong>Footer</strong></td>
<td class="last"><input name="footer" type="text" value="{$options[options].footer}" size="70" maxlength="200" /></td>
</tr>
<!--Meta Info-->
<tr>
<td class="first"><strong>Meta Description</strong></td>
<td class="last"><input name="metadescription" type="text" value="{$options[options].metadescription}" size="70" maxlength="30" /></td>
</tr>
<tr>
<td class="first"><strong>Meta Keywords</strong></td>
<td class="last"><input name="metakeywords" type="text" value="{$options[options].metakeywords}" size="70" maxlength="30" /></td>
</tr>
<!--Template-->
<tr>
<td class="first"><strong>{$LAN_69}</strong></td>
<td class="last"><input name="template" type="text" value="{$options[options].template}" size="70" maxlength="30" /></td>
</tr>
<!--Videos Per Page-->
<tr>
<td class="first"><strong>{$LAN_57}</strong></td>
<td class="last"><input name="vids_per_page" type="text" value="{$options[options].vids_per_page}" size="70" maxlength="2" /></td>
</tr>
<tr>
<td class="first"><strong>{$LAN_58}</strong></td>
<td class="last">
<label><input name="lang" type="radio" value="en-gb.inc.php" {if $options[options].lang eq "en-gb.inc.php"}checked="checked"{/if} />English</label>
<label><input name="lang" type="radio" value="fr.inc.php" {if $options[options].lang eq "fr.inc.php"}checked="checked"{/if} />French</label>
</td>
</tr>
</tbody>
</table>
</div>
{/section}
<br />
<input type="hidden" name="options" />
<input name="submit" type="submit" value="Edit" />
<br />
<span class="redsmall">{$LAN_66}</span>
</form>

admin/options.php
Code: [Select]
<?php
/*
+ ----------------------------------------------------------------------------+
|     PHPDirector.
| $License: GPL General Public License
| $Website: phpdirector.co.uk
| $Author: Ben Swanson
| $Contributors - Dennis Berko and Monte Ohrt (Monte Ohrt)
+----------------------------------------------------------------------------+
*/
ob_start(); 
session_start(); 
include(
"admin_header.php");
if (
checkLoggedin()){
if(isset(
$_POST["options"])){
mysql_query("UPDATE pp_config SET name = '$_POST[name]'");
mysql_query("UPDATE pp_config SET news = '$_POST[news]'");
mysql_query("UPDATE pp_config SET logo = '$_POST[logo]'");
mysql_query("UPDATE pp_config SET favicon = '$_POST[favicon]'");
mysql_query("UPDATE pp_config SET alt = '$_POST[alt]'");
mysql_query("UPDATE pp_config SET slogan = '$_POST[slogan]'");
mysql_query("UPDATE pp_config SET footer = '$_POST[footer]'");
mysql_query("UPDATE pp_config SET vids_per_page = '$_POST[vids_per_page]'");
mysql_query("UPDATE pp_config SET cssstyle = '$_POST[cssstyle]'");
mysql_query("UPDATE pp_config SET lang = '$_POST[lang]'");
mysql_query("UPDATE pp_config SET template = '$_POST[template]'");
mysql_query("UPDATE pp_config SET metadescription = '$_POST[metadescription]'");
mysql_query("UPDATE pp_config SET metakeywords = '$_POST[metakeywords]'");

}
$result mysql_query("SELECT * FROM pp_config");

while (
$row mysql_fetch_assoc($result)){
$options[] = $row;
}
$smarty->assign('options'$options);


//Gets Languages
if ($handle opendir('../lang')) {
  while (
false !== ($lang readdir($handle)))
  {
   if (
$lang != "." && $lang != ".." && $lang != "index.html"
     
&& $lang != ".svn")
     
$smarty->assign('lang'$lang);
  }
  
closedir($handle);
}

////Gets Languages

$smarty->display('options.tpl');
}else{
header("location: login.php");
}
mysql_close($mysql_link);
?>


What I use to display some of the info:
Code: [Select]
{$config_metadescription}
{$config_metakeywords}

{$config_favicon|default:""templates/default/images/x-icon.ico"}
{$config_logo|default:"templates/default/images/logo.png"}

{$config_name|default:"PHPDirector"}
{$config_slogan|default:'A Community Driven Project'}
{$config_footer}

Any help would be great.

Offline Shave.

  • Development Team
  • Full phpd Member
  • *******
  • Posts: 80
  • Karma: 0
    • View Profile
    • PHPD Mods
Re: My version of 0.23 (unofficial)!
« Reply #6 on: November 29, 2009, 12:03:39 AM »
your fine so far just not completed the code,

open up admin_header.php and replace it with the following,

Code: [Select]
<?php
/*
+ ----------------------------------------------------------------------------+
|     PHPDirector.
| $License: GPL General Public License
| $Website: phpdirector.co.uk
| $Author: Ben Swanson
| $Contributors - Dennis Berko and Monte Ohrt (Monte Ohrt)
+----------------------------------------------------------------------------+
*/
session_start();
require(
'../libs/Smarty.class.php');
require(
'../libs/SmartyPaginate.class.php');
include(
"../db.php");
include(
"../includes/function.inc.php");
require_once (
"functions.php"); 
$template config('template');
$smarty = new Smarty();
$smarty->template_dir '../templates/'.$template.'/admin';
$smarty->compile_dir '../templates_c/admin';
$smarty->cache_dir '../cache';
$smarty->config_dir '../configs';

$cnf_metadescription config('metadescription');
$smarty->assign('config_metadescription'$cnf_metadescription);
$cnf_metakeywords config('metakeywords');
$smarty->assign('config_metakeywords'$cnf_metakeywords);
$cnf_favicon config('favicon');
$smarty->assign('config_favicon'$cnf_favicon);
$cnf_name config('name');
$smarty->assign('config_name'$cnf_name);
$cnf_logo config('logo');
$smarty->assign('config_logo'$cnf_logo);
$cnf_slogan config('slogan');
$smarty->assign('config_slogan'$cnf_slogan);
$cnf_footer config('footer');
$smarty->assign('config_footer'$cnf_footer);
$smarty->assign('pagetype'$_GET["pt"]);
$smarty->assign('pag'$_GET["pag"]);
include(
"../lang/".config('lang'));
?>

and also header.php replace the code with this...

Code: [Select]
<?php
/*
+ ----------------------------------------------------------------------------+
|     PHPDirector.
| $License: GPL General Public License
| $Website: phpdirector.co.uk
| $Author: Ben Swanson
| $Contributors - Dennis Berko and Monte Ohrt (Monte Ohrt)
+----------------------------------------------------------------------------+
*/

//Installed?
$filename "installed.php";
$handle fopen($filename"r");
$contents fread($handlefilesize($filename));
fclose($handle);
$explode_cont explode(";"$contents);
if (
$explode_cont[1] !== "Yes"){
header("Location: install/index.php");
}
//Installed?

require('libs/Smarty.class.php');
require(
'libs/SmartyPaginate.class.php');
include(
"db.php");
if(isset(
$_POST["comment"])){
header("location: videos.php?id=" $_GET["id"] . "");
$ip $_SERVER["REMOTE_ADDR"];
mysql_query("INSERT INTO pp_comments (video_id, ip, comment) VALUES ('$_GET[id]', '$ip', '$_POST[comment]')");
}
include(
"includes/function.inc.php");
$template config('template');
$smarty = new Smarty();
$smarty->template_dir './templates/'.$template;
$smarty->compile_dir './templates_c';
$smarty->cache_dir './cache';
$smarty->config_dir './configs';

include(
"lang/".config('lang'));

$sort1 $_GET['sort'];
$page $_GET['page'];
$pagetype $_GET["pt"];
$smarty->assign('pagetype'$pagetype);
$smarty->assign('next'$_GET["next"]);
$cnf_name config('name');
$smarty->assign('config_name'$cnf_name);


//LOGO//
$cnf_logo config('logo');
$smarty->assign('config_logo'$cnf_logo);
//LOGO//

//FavIcon//
$cnf_favicon config('favicon');
$smarty->assign('config_favicon'$cnf_favicon);
//favIcon//

//meta//
$cnf_metadescription config('metadescription');
$smarty->assign('config_metadescription'$cnf_metadescription);
$cnf_metakeywords config('metakeywords');
$smarty->assign('config_box1'$cnf_metakeywords);
//meta//

//SLOGAN//
$cnf_slogan config('slogan');
$smarty->assign('config_slogan'$cnf_slogan);
//SLOGAN//

//FOOTER//
$cnf_footer config('footer');
$smarty->assign('config_footer'$cnf_footer);
//FOOTER//

//NEWS//
$news config('news');
$smarty->assign('news'$news);
//NEWS//

//Firefox?
$HTTP_USER_AGENT $_SERVER['HTTP_USER_AGENT'];
if (!(
strpos($HTTP_USER_AGENT,'Mozilla/5') === false)) {
$smarty->assign('firefox''1');
} else {
$smarty->assign('firefox''0');
}
//Firefox? END
?>

think that will work if not let me know

Offline FireDart

  • Project Leader
  • Pro Member
  • *****
  • Posts: 406
  • Karma: 4
    • View Profile
    • FireDart
Re: My version of 0.23 (unofficial)!
« Reply #7 on: November 29, 2009, 01:14:07 AM »
Works like a charm, thanks.

Offline Shave.

  • Development Team
  • Full phpd Member
  • *******
  • Posts: 80
  • Karma: 0
    • View Profile
    • PHPD Mods
Re: My version of 0.23 (unofficial)!
« Reply #8 on: November 29, 2009, 02:28:07 AM »
lol not a problem fd.

I've got here a 0.233 Alpha release of phpdirector again its an unoffical  :( but its keeping me busy in my spare time.

Whats Changed

Again like before theres not much changes just little bits and pieces

Comment on video feature

Bookmark addon

Video Page layout updated

FavIcon added

Meta tags added (changable from admin panel)

Download It
http://www.phpdmods.com/vms/Phpdirector-0-233-Alpha(Unofficial).zip

Hopfully if I have the patants to do so I'll try and code in a member system but I'm not makeing any promises. 

Offline FireDart

  • Project Leader
  • Pro Member
  • *****
  • Posts: 406
  • Karma: 4
    • View Profile
    • FireDart
Re: My version of 0.23 (unofficial)!
« Reply #9 on: November 29, 2009, 05:06:24 AM »
Thanks for all your work.

I just finished recoding the admin panel, should fix some bugs and it's valid :P

Plus I learned some new things about PHPDirector.

Offline Shave.

  • Development Team
  • Full phpd Member
  • *******
  • Posts: 80
  • Karma: 0
    • View Profile
    • PHPD Mods
Version 0.23
« Reply #10 on: November 29, 2009, 11:02:01 PM »
0.234 Alpha
http://www.phpdmods.com/vms/Phpdirector-0-234-Alpha(Unofficial).zip

Another Quick update including a FAQ, TOS & an About us page all editable via the admin panel, also I've added the mod so comments are editable in the adminpanel.


Offline Shave.

  • Development Team
  • Full phpd Member
  • *******
  • Posts: 80
  • Karma: 0
    • View Profile
    • PHPD Mods
Re: My version of 0.23 (unofficial)!
« Reply #11 on: November 30, 2009, 12:20:14 AM »
0.235 Release
http://www.phpdmods.com/vms/Phpdirector-0-235-Alpha(Unofficial).zip

Just added rss feeds to it and thats it.

Offline winracer

  • Development Team
  • Pro Member
  • *******
  • Posts: 446
  • Karma: 3
    • View Profile
    • helpmewithperl.com
  • Script Version: 1.0+
Re: My version of 0.23 (unofficial)!
« Reply #12 on: November 30, 2009, 02:44:33 PM »
0.235 Release
http://www.phpdmods.com/vms/Phpdirector-0-235-Alpha(Unofficial).zip

Just added rss feeds to it and thats it.

Shave I just tried to install from the download file and when it gets to the 2nd part when you click on that you have read.... it goes to install/connect.php and I do not see that file. error on screen. Am i missing something
winracer
myfunnypets.com
helpmewithperl.com
coosavalleyclassifieds.com
brownlows.net
myphpforum.com

Offline Shave.

  • Development Team
  • Full phpd Member
  • *******
  • Posts: 80
  • Karma: 0
    • View Profile
    • PHPD Mods
Re: My version of 0.23 (unofficial)!
« Reply #13 on: November 30, 2009, 03:26:52 PM »
0.235 Release
http://www.phpdmods.com/vms/Phpdirector-0-235-Alpha(Unofficial).zip

Just added rss feeds to it and thats it.

Shave I just tried to install from the download file and when it gets to the 2nd part when you click on that you have read.... it goes to install/connect.php and I do not see that file. error on screen. Am i missing something

My bad I mixed up to scripts when I made that 0.235, I fixed the bug and made it a beta release link below

http://www.phpdmods.com/vms/Phpdirector-0-235-Beta(Unofficial).zip

Offline winracer

  • Development Team
  • Pro Member
  • *******
  • Posts: 446
  • Karma: 3
    • View Profile
    • helpmewithperl.com
  • Script Version: 1.0+
Re: My version of 0.23 (unofficial)!
« Reply #14 on: November 30, 2009, 05:12:53 PM »
0.235 Release
http://www.phpdmods.com/vms/Phpdirector-0-235-Alpha(Unofficial).zip

Just added rss feeds to it and thats it.

Shave I just tried to install from the download file and when it gets to the 2nd part when you click on that you have read.... it goes to install/connect.php and I do not see that file. error on screen. Am i missing something

My bad I mixed up to scripts when I made that 0.235, I fixed the bug and made it a beta release link below

http://www.phpdmods.com/vms/Phpdirector-0-235-Beta(Unofficial).zip


I get the samething with this one.
winracer
myfunnypets.com
helpmewithperl.com
coosavalleyclassifieds.com
brownlows.net
myphpforum.com