eMoneySpace
Welcome, Guest. Please login or register.
Did you miss your activation email?
News: Welcome to eMoneySpace! Aug 17, 2022 08:45 pm




FREE Mod: Review/Edit/Delete Terms on the SDR 1.1b
Print
Author Topic: FREE Mod: Review/Edit/Delete Terms on the SDR 1.1b  (Read 2571 times)
757jterrell
Reputation: (+29)
*

Offline

Gender: Male
Posts: 967
Referrals: 0


Get a site from the OWNERS of the script!!!

View Profile WWW
May 30, 2010 12:50 pm

Hello all,

A lot of admins have been asking for this mod. This update is only valid for the SDR 1 series with the add/delete terms addon; it will be standard in the SDR 2. What we want to do is update the terms page from this:



To this:



First, we want to make a edit terms file called admin2/edit_terms.php  and here are the contents of that file:

<?
$includes[title]="Edit Terms of Service";

if($action == "edit") {
   $Db1->query("UPDATE terms SET
      title='".addslashes($title)."',
      terms='".addslashes($terms)."',
      dsub='".time()."'
      WHERE id='$id'");
      $Db1->sql_close();
      header("Location: admin.php?view=admin&ac=terms&".$url_variables."");
}

$sql=$Db1->query("SELECT * FROM terms WHERE id='$id'");
$faq=$Db1->fetch_array($sql);

$includes[content]="
<div align=\"Center\">
<form action=\"admin.php?view=admin&ac=edit_terms&action=edit&id=$id&".$url_variables."\" method=\"post\">
<table>
   <tr>
      <td>Terms Section Title</td>
      <td><input type=\"text\" name=\"title\" value=\"".htmlentities(stripslashes($faq[title]))."\" size=\"35\"></td>
   </tr>
   <tr>
      <td>Terms section text:</td>
      <td>
         <textarea name=\"terms\" cols=25 rows=5>".htmlentities(stripslashes($faq[terms]))."</textarea><br />
         <br>
      </td>
   </tr>
      <td colspan=2 align=\"center\"><input type=\"submit\" value=\"Save\"></td>
   </tr>
</table>
</form>
</div>
";
?>

**************************************************************************************************************
Now, we want to modify the admin2/terms.php file so it appears as below. Best best is to simply cut out the old code and just paste in this whole file.   mrgreen

<?
$includes[title]="Manage Terms Of Service";
//**S**//
if($action == "add") {
   $sql=$Db1->query("INSERT INTO terms SET title='".addslashes($title)."' , imglink=' ".$settings[base_url]."/images/icons/termsicon.png' , dsub='".time()."', terms='".addslashes($terms)."'");
}

$sql=$Db1->query("SELECT * FROM terms ORDER BY title");
for($x=0; $title=$Db1->fetch_array($sql); $x++) {
   $titlelist.="<option value=\"$title[id]\">".htmlentities(stripslashes($title[title]))."";
   $sql2=$Db1->query("SELECT * FROM terms WHERE title='$title[id]'");
      $sql2=$Db1->query("SELECT * FROM terms");
      $faqs="";
   while($faq=$Db1->fetch_array($sql2)) {
      $faqs.="<option value=\"$faq[id]\">".htmlentities(stripslashes($faq[title]))."";
   }
   
   $thelist.="
   <tr class=\"tableHL1\">
      <td><b><big>$title[title]</big></b></td>
      <td align=\"right\" width=75>
         <small>
            <a href=\"admin.php?view=admin&ac=edit_terms&id=$title[id]&".$url_variables."\">Edit</a> :
            <a href=\"admin.php?view=admin&ac=delete_terms&id=$title[id]&".$url_variables."\" onclick=\"return confirm('Are you sure you want to delete this?')\">Delete</a>
         </small>
      </td>
   </tr>            
      
   </tr>
   ";
}


$includes[content]="
<form name=\"faqform\">
<center>
<table width=\"100%\">
   $thelist
</table>
</form>

<form method=\"post\" action=\"admin.php?view=admin&ac=terms&action=add&".$url_variables."\">
<table>
   <tr>
      <td>Terms Section Title</td>
      <td><input type=\"text\" name=\"title\"></td>
   </tr>
   <tr>
      <td colspan=2>Terms Sectin Text:<br><textarea name=\"terms\" cols=25 rows=5></textarea></td>
   </tr>
   <tr>
      <td align=\"center\" colspan=2><input type=\"submit\" value=\"Add Term\"></td>
   </tr>
</table>
</center>
</form>
";

//**E**//
?>

****************************************************************************************
This is what the edit terms page will look like:

« Last Edit: May 30, 2010 01:41 pm by 757jterrell » Logged

Legit Sites
Reputation: (+16)
*

Offline

Gender: Male
Posts: 818
Referrals: 2


View Profile WWW
Reply #1: May 30, 2010 03:12 pm

Nice Addon to the original feature but wish you hadn't released the code. I have already updated the addon I sell to this new version.

Keep up the work Smiley
Logged


FJWorld
Reputation: (+45)
*

Offline

Gender: Male
Posts: 6159
Referrals: 42


Let's Work Together!

View Profile WWW
Reply #2: May 30, 2010 03:36 pm

Ah your so kind JT

Your reseller offers an add on to do this and you provide the code for free.
http://www.earnmoneyspace.com/forum/index.php/topic,72102.0.html

Very interesting but not too funny.

Talk about working together.

John does provide installation so that is important to many owners.

Logged

757jterrell
Reputation: (+29)
*

Offline

Gender: Male
Posts: 967
Referrals: 0


Get a site from the OWNERS of the script!!!

View Profile WWW
Reply #3: May 30, 2010 04:11 pm

In all fairness guys, this was supposed to have been done before we released this addon, that's why we are releasing it free. Of course, you all are more than welcome to charge for installation.

@FJ, I have no idea if this is even close to what parks has. I have been working on this one on and off for a few days.
« Last Edit: May 30, 2010 04:14 pm by 757jterrell » Logged

Raffay
Reputation: (+14)
*

Offline

Posts: 2130
Referrals: 42

View Profile
Reply #4: May 31, 2010 06:13 am

Thanks JT
Logged

FJWorld
Reputation: (+45)
*

Offline

Gender: Male
Posts: 6159
Referrals: 42


Let's Work Together!

View Profile WWW
Reply #5: May 31, 2010 09:10 am

This is strange. I must have had a brain fart because I thought I posted on a News Add On and now it's a Terms addon

Hmm

Maybe I'm losing it.

Anybody else notice this?
Logged

maderitescripts

Reputation: (+22)
*

Offline

Posts: 1589
Referrals: 4


NO Lounging

View Profile
Reply #6: May 31, 2010 09:18 am

Ah your so kind JT

Your reseller offers an add on to do this and you provide the code for free.
http://www.earnmoneyspace.com/forum/index.php/topic,72102.0.html

Very interesting but not too funny.

Talk about working together.

John does provide installation so that is important to many owners.



of course FJ just another chapter in the burn maderite at the stake story!!!!
Logged



    War is an ugly thing, but not the ugliest of things. The decayed and degraded state of moral and patriotic feeling which thinks that nothing is worth war is much worse. The person who has nothing for which he is willing to fight, nothing which is more important than his own personal safety, is a miserable creature and has no chance of being free unless made and kept so by the exertions of better men than himself.  (John Stuart Mill)
757jterrell
Reputation: (+29)
*

Offline

Gender: Male
Posts: 967
Referrals: 0


Get a site from the OWNERS of the script!!!

View Profile WWW
Reply #7: May 31, 2010 10:17 am

This is strange. I must have had a brain fart because I thought I posted on a News Add On and now it's a Terms addon

Hmm

Maybe I'm losing it.

Anybody else notice this?

Fj, there is another thread for that add-on.  mrgreen
Logged

FJWorld
Reputation: (+45)
*

Offline

Gender: Male
Posts: 6159
Referrals: 42


Let's Work Together!

View Profile WWW
Reply #8: May 31, 2010 12:40 pm

Fj, there is another thread for that add-on.  mrgreen

yeah, I know that now.

I had a brain fart when I saw free code for something that was being sold.

Anyway, if anyone needs help to implement this into their site I can do it for them or I can actually customized it some more.  big grin
Logged

Allinone
Reputation: (+18)
*

Offline

Posts: 994
Referrals: 0

View Profile
Reply #9: May 31, 2010 12:43 pm

Hello all,

A lot of admins have been asking for this mod. This update is only valid for the SDR 1 series with the add/delete terms addon; it will be standard in the SDR 2. What we want to do is update the terms page from this:



To this:



First, we want to make a edit terms file called admin2/edit_terms.php  and here are the contents of that file:

<?
$includes[title]="Edit Terms of Service";

if($action == "edit") {
   $Db1->query("UPDATE terms SET
      title='".addslashes($title)."',
      terms='".addslashes($terms)."',
      dsub='".time()."'
      WHERE id='$id'");
      $Db1->sql_close();
      header("Location: admin.php?view=admin&ac=terms&".$url_variables."");
}

$sql=$Db1->query("SELECT * FROM terms WHERE id='$id'");
$faq=$Db1->fetch_array($sql);

$includes[content]="
<div align=\"Center\">
<form action=\"admin.php?view=admin&ac=edit_terms&action=edit&id=$id&".$url_variables."\" method=\"post\">
<table>
   <tr>
      <td>Terms Section Title</td>
      <td><input type=\"text\" name=\"title\" value=\"".htmlentities(stripslashes($faq[title]))."\" size=\"35\"></td>
   </tr>
   <tr>
      <td>Terms section text:</td>
      <td>
         <textarea name=\"terms\" cols=25 rows=5>".htmlentities(stripslashes($faq[terms]))."</textarea><br />
         <br>
      </td>
   </tr>
      <td colspan=2 align=\"center\"><input type=\"submit\" value=\"Save\"></td>
   </tr>
</table>
</form>
</div>
";
?>

**************************************************************************************************************
Now, we want to modify the admin2/terms.php file so it appears as below. Best best is to simply cut out the old code and just paste in this whole file.   mrgreen

<?
$includes[title]="Manage Terms Of Service";
//**S**//
if($action == "add") {
   $sql=$Db1->query("INSERT INTO terms SET title='".addslashes($title)."' , imglink=' ".$settings[base_url]."/images/icons/termsicon.png' , dsub='".time()."', terms='".addslashes($terms)."'");
}

$sql=$Db1->query("SELECT * FROM terms ORDER BY title");
for($x=0; $title=$Db1->fetch_array($sql); $x++) {
   $titlelist.="<option value=\"$title[id]\">".htmlentities(stripslashes($title[title]))."";
   $sql2=$Db1->query("SELECT * FROM terms WHERE title='$title[id]'");
      $sql2=$Db1->query("SELECT * FROM terms");
      $faqs="";
   while($faq=$Db1->fetch_array($sql2)) {
      $faqs.="<option value=\"$faq[id]\">".htmlentities(stripslashes($faq[title]))."";
   }
   
   $thelist.="
   <tr class=\"tableHL1\">
      <td><b><big>$title[title]</big></b></td>
      <td align=\"right\" width=75>
         <small>
            <a href=\"admin.php?view=admin&ac=edit_terms&id=$title[id]&".$url_variables."\">Edit</a> :
            <a href=\"admin.php?view=admin&ac=delete_terms&id=$title[id]&".$url_variables."\" onclick=\"return confirm('Are you sure you want to delete this?')\">Delete</a>
         </small>
      </td>
   </tr>            
      
   </tr>
   ";
}


$includes[content]="
<form name=\"faqform\">
<center>
<table width=\"100%\">
   $thelist
</table>
</form>

<form method=\"post\" action=\"admin.php?view=admin&ac=terms&action=add&".$url_variables."\">
<table>
   <tr>
      <td>Terms Section Title</td>
      <td><input type=\"text\" name=\"title\"></td>
   </tr>
   <tr>
      <td colspan=2>Terms Sectin Text:<br><textarea name=\"terms\" cols=25 rows=5></textarea></td>
   </tr>
   <tr>
      <td align=\"center\" colspan=2><input type=\"submit\" value=\"Add Term\"></td>
   </tr>
</table>
</center>
</form>
";

//**E**//
?>

****************************************************************************************
This is what the edit terms page will look like:



interesting
Logged

maderitescripts

Reputation: (+22)
*

Offline

Posts: 1589
Referrals: 4


NO Lounging

View Profile
Reply #10: May 31, 2010 02:54 pm

especially since i think you have had this on yoru site awhile havent you cash
Logged



    War is an ugly thing, but not the ugliest of things. The decayed and degraded state of moral and patriotic feeling which thinks that nothing is worth war is much worse. The person who has nothing for which he is willing to fight, nothing which is more important than his own personal safety, is a miserable creature and has no chance of being free unless made and kept so by the exertions of better men than himself.  (John Stuart Mill)
757jterrell
Reputation: (+29)
*

Offline

Gender: Male
Posts: 967
Referrals: 0


Get a site from the OWNERS of the script!!!

View Profile WWW
Reply #11: May 31, 2010 02:58 pm

I seriously doubt its this version parks, Give it a rest already. We all now you are upset. Go cry somewhere else.
Logged

Addons
Reputation: (+10)
*

Offline

Gender: Male
Posts: 2179
Referrals: 3


View Profile WWW
Reply #12: May 31, 2010 09:33 pm

Great Addons

We want more  Grin
Logged

Lead Capture Page, Email Template, Image Croping/removing Background etc... PTCevolution, Gen4, Aurora GPT, Xeon, Zeus (Template, Banners)
Print
 
Jump to:  
Copyright © 2008-2022 eMoneySpace. All rights reserved.