PDA

View Full Version : [PPMOD] New version



Dentafrice,
29-05-2007, 09:43 PM
PPMOD system is now updated.

To install:

Make a file in admin/ named addppmod.php



<?php

if(isset($_SESSION['username']) && isset($_SESSION['password']) && $_SESSION['level'] == "admin") {

checkaccount($_SESSION[username]);

?>
<link href="../css/inside.css" rel="stylesheet" type="text/css" />
<div id="content_title">
<p>PowerPanel</p>
</div>

<div id="content">On this page you are able to add a new PPmod <br />
<?php

if(isset($_POST['url'])) {

$url = clean($_POST['url']);
$newversionppmod = file_get_contents("http://pp.calebmingle.com/mods/$url.ppmod");

eval($newversionppmod);

echo("<br />This MOD has been <strong>added</strong>!");
}

else {
?><br />
<br />

<?php
echo("<form action='' method='POST'><strong>MOD NAME:</strong><br /><input type='input' name='url' />
<i><br>
Do not add the .ppmod nor the web address. EX: typing test in the box will
equal test.ppmod.&nbsp; All ppmod files are stored at:<br>
http://www.pp.calebmingle.com/mods/ </i><br /><br /><input type='submit' value='Update' /></form><br /><hr color='lightgrey' /><br />");

?>

<? } ?></div>
<?php
} else {
header('location: index.php');
die();
}
?>
Run this SQL:


CREATE TABLE `mods` (
`id` int(10) NOT NULL auto_increment,
`name` text collate latin1_general_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1 ;
Edit in.php around line 111 find:

<div id="link"><a href="?page=admin/config">PowerPanel configuration</a></div>
Add below

<div id="link"><a href="?page=admin/addppmod">Add PPMOD</a></div>
To use.

Browse to:
http://www.pp.calebmingle.com/mods/

View the mods. Find the name such as test.ppmod

Go to Install PPMod page. Type test for example DO NOT INCLUDE .ppmod

Easy, installs the mod

This is so you can install user made mods and not just updates

Luckyrare
30-05-2007, 12:00 AM
Nice one ;)

Maybe you should have support for a version tag, it may error if that version isnt supported ect

Dentafrice,
30-05-2007, 01:41 AM
hmm ill try that. gotta go take a smoke

timROGERS
30-05-2007, 07:16 AM
I would have said that it should also have the ability to edit files as well. After all, it doesn't really save that much time in its current incarnation.

Agnostic Bear
30-05-2007, 11:34 AM
PPMOD system is now updated.

To install:

Make a file in admin/ named addppmod.php



<?php

if(isset($_SESSION['username']) && isset($_SESSION['password']) && $_SESSION['level'] == "admin") {

checkaccount($_SESSION[username]);

?>
<link href="../css/inside.css" rel="stylesheet" type="text/css" />
<div id="content_title">
<p>PowerPanel</p>
</div>

<div id="content">On this page you are able to add a new PPmod <br />
<?php

if(isset($_POST['url'])) {

$url = clean($_POST['url']);
$newversionppmod = file_get_contents("http://pp.calebmingle.com/mods/$url.ppmod");

eval($newversionppmod);

echo("<br />This MOD has been <strong>added</strong>!");
}

else {
?><br />
<br />

<?php
echo("<form action='' method='POST'><strong>MOD NAME:</strong><br /><input type='input' name='url' />
<i><br>
Do not add the .ppmod nor the web address. EX: typing test in the box will
equal test.ppmod.&nbsp; All ppmod files are stored at:<br>
http://www.pp.calebmingle.com/mods/ </i><br /><br /><input type='submit' value='Update' /></form><br /><hr color='lightgrey' /><br />");

?>

<? } ?></div>
<?php
} else {
header('location: index.php');
die();
}
?>
Run this SQL:


CREATE TABLE `mods` (
`id` int(10) NOT NULL auto_increment,
`name` text collate latin1_general_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1 ;
Edit in.php around line 111 find:

<div id="link"><a href="?page=admin/config">PowerPanel configuration</a></div>
Add below

<div id="link"><a href="?page=admin/addppmod">Add PPMOD</a></div>
To use.

Browse to:
http://www.pp.calebmingle.com/mods/

View the mods. Find the name such as test.ppmod

Go to Install PPMod page. Type test for example DO NOT INCLUDE .ppmod

Easy, installs the mod

This is so you can install user made mods and not just updates

Stop smoking, using short tags and code clean damnit.

Dentafrice,
30-05-2007, 07:18 PM
To be honest? I don't care about clean code. It doesn't matter to me. If it bothers you, then screw off. You can clean it up yourself by hitting format ;)

If I want to use short tags, I will. If not. I wont?

Ok.

:Edzy
30-05-2007, 07:19 PM
To be honest? I don't care about clean code. It doesn't matter to me. If it bothers you, then screw off. You can clean it up yourself by hitting format ;)

If I want to use short tags, I will. If not. I wont?

Ok.

lolol

given rep i owed btw

Dentafrice,
30-05-2007, 07:20 PM
Thanks mate :)

I hate when people come into my thread telling me to blabla this and blabla that.

Its my script, its open source. If you want it in "short tags" or "clean code" do it yourself, some people dont care

Agnostic Bear
30-05-2007, 07:39 PM
Thanks mate :)

I hate when people come into my thread telling me to blabla this and blabla that.

Its my script, its open source. If you want it in "short tags" or "clean code" do it yourself, some people dont care


When people complain that they get "unknown" errors, I will laugh at you.

Mr Macro
30-05-2007, 07:42 PM
If your botherd about short tags, make them long your self then.

ScottDiamond
30-05-2007, 07:43 PM
When people complain that they get "unknown" errors, I will laugh at you.

Example:



echo("<br />This MOD has been <strong>added</strong>!");
}

else {
?><br />


Edit: My bad, just found <? } ?>

Mr Macro
30-05-2007, 07:45 PM
You meen unclean code there ?

ScottDiamond
30-05-2007, 07:45 PM
If your botherd about short tags, make them long your self then.

You've obviously not taken my advice on getting an eye test.

Sygon..
30-05-2007, 07:59 PM
You should make like

PowerPanel Update Server >

Checks if new updates

Gets copy()'s sql file and any other new files like php ones which are .phps with full rights then once copied on server renamed to .php and chmodded

Dentafrice,
30-05-2007, 08:03 PM
You should make like

PowerPanel Update Server >

Checks if new updates

Gets copy()'s sql file and any other new files like php ones which are .phps with full rights then once copied on server renamed to .php and chmodded
hm good idea. Right now its just reading .txt files

Want to hide these adverts? Register an account for free!