Re: Bug Report NS-Settings.php

"Eric Barr" <[email protected]> Mon, 16 Sep 2002 08:47:56 -0500
Newsgroups gmane.comp.web.envolution.devel,gmane.spam.detected
Message-ID <000e01c25d87$a9c344f0$1768ac41@Sylvester>
This is a multi-part message in MIME format.

------=_NextPart_000_000A_01C25D5D.C0D32540
Content-Type: multipart/alternative;
	boundary="----=_NextPart_001_000B_01C25D5D.C0D32540"


------=_NextPart_001_000B_01C25D5D.C0D32540
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

In order to get your theme to install, you need to include a copy of =
encinit.php in the directory of the theme your trying to use. I have =
attached a default encinit.php file to this email for you to use. Please =
revert back to the new version of NS-Settings. Thanks :)

ApathyBoy
  ----- Original Message -----=20
  From: James Pegram=20
  To: [email protected]=20
  Sent: Monday, September 16, 2002 8:25 AM
  Subject: [envdev] Bug Report NS-Settings.php


  This may have made the rounds already but here goes anyway.=20

  After running the fix.php update for rc10 I only had Envolved and =
ExtraLite Themes when I went to settings.=20

  After adding my theme back to the database, I still only had those 2 =
themes in settings.

  If I changed to ExtraLite, the list only showed Extralite as an =
available theme.

  Didn't try and fix it, I simply reverted back to the old NS-Settings =
and it works fine.=20

  -Razor





-------------------------------------------------------------------------=
-----
  Do you Yahoo!?
  Yahoo! News - Today's headlines

------=_NextPart_001_000B_01C25D5D.C0D32540
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2716.2200" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>In order to get your theme to install, =
you need to=20
include a copy of encinit.php in the directory of the theme your trying =
to use.=20
I have attached a default encinit.php file to this email for you to use. =
Please=20
revert back to the new version of NS-Settings. Thanks :)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>ApathyBoy</FONT></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A title=3Drazornc-/[email protected] href=3D"mailto:[email protected]">James =
Pegram</A>=20
  </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
[email protected]=20
  href=3D"mailto:[email protected]">[email protected]</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Monday, September 16, =
2002 8:25=20
  AM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> [envdev] Bug Report=20
  NS-Settings.php</DIV>
  <DIV><BR></DIV>
  <P>This may have made the rounds already but here goes anyway. =
<BR><BR>After=20
  running the fix.php update for rc10 I only had Envolved and ExtraLite =
Themes=20
  when I went to settings. <BR><BR>After adding my theme back to the =
database, I=20
  still only had those 2 themes in settings.<BR><BR>If I changed to =
ExtraLite,=20
  the list only showed Extralite as an available theme.<BR><BR>Didn't =
try and=20
  fix it, I simply reverted back to the old NS-Settings and it works =
fine.=20
  <P>-Razor</P>
  <P><BR>
  <HR SIZE=3D1>
  Do you Yahoo!?<BR><B><A href=3D"http://news.yahoo.com/">Yahoo! =
News</A></B> -=20
  Today's headlines</BLOCKQUOTE></BODY></HTML>

------=_NextPart_001_000B_01C25D5D.C0D32540--

------=_NextPart_000_000A_01C25D5D.C0D32540
Content-Type: application/octet-stream;
	name="encinit.php"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="encinit.php"

<?php=0A=
// File: $Id: Exp $ $Name:  $=0A=
// Copyright (c) 2002 by Brian K. Virgin (madhatter7-9O8nC7T3vzfSUeElwK9/[email protected])=0A=
// http://www.envolution.com=0A=
// Envolution Content Management System - http://www.envolution.com=0A=
//=0A=
// =
-------------------------------------------------------------------------=
---=0A=
// LICENSE=0A=
//=0A=
// This program is free software; you can redistribute it and/or=0A=
// modify it under the terms of the GNU General Public License (GPL)=0A=
// as published by the Free Software Foundation; either version 2=0A=
// of the License, or (at your option) any later version.=0A=
//=0A=
// This program is distributed in the hope that it will be useful,=0A=
// but WITHOUT ANY WARRANTY; without even the implied warranty of=0A=
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the=0A=
// GNU General Public License for more details.=0A=
//=0A=
// To read the license please read the docs/license.txt or visit=0A=
// http://www.gnu.org/copyleft/gpl.html=0A=
//=0A=
// =
-------------------------------------------------------------------------=
---=0A=
// Filename:        Encompss Skin Init                                   =
     encinit.php=0A=
// Author:                Brian K. Virgin=0A=
// Version:                0.926=0A=
// Purpose:                Install and Uninstall Skins=0A=
// =
-------------------------------------------------------------------------=
---=0A=
// Changelog=0A=
//=0A=
// =
-------------------------------------------------------------------------=
---=0A=
=0A=
=0A=
function encompass_skins_install($args)=0A=
{=0A=
        if (!pnSecAuthAction(0, 'Encompass', '::', ACCESS_EDIT))=0A=
        {=0A=
                return false;=0A=
        }=0A=
=0A=
        extract($args);=0A=
=0A=
        $skinName =3D $id;=0A=
=0A=
        // Setup DB handle=0A=
        list($dbconn) =3D pnDBGetConn();=0A=
        $pntable =3D pnDBGetTables();=0A=
=0A=
        // Setup the table and column info=0A=
        $table =3D $pntable['theme_skins'];=0A=
        $column =3D &$pntable['theme_skins_column'];=0A=
=0A=
        // Get the next available skin id=0A=
        $id =3D $dbconn->GenId($table);=0A=
=0A=
        // Insert Data into _themes_skins=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                        VALUES ($id,=0A=
                                                        '$skinName',=0A=
                                                        1,=0A=
                                                        0,=0A=
                                                        '#FFFFFF',=0A=
                                                        '#FFFFFF',=0A=
                                                        '#FFFFFF',=0A=
                                                        '#FFFFFF',=0A=
                                                        '#FFFFFF',=0A=
                                                        '#FFFFFF',=0A=
                                                        '#000000',=0A=
                                                        '#000000',=0A=
                                                        '#000000')");=0A=
=0A=
        $skinID =3D pnModAPIFunc('Encompass','user','getSkinID',=0A=
                                                                        =
array('skin' =3D> $skinName));=0A=
=0A=
        // Setup the table and column info=0A=
        $table =3D $pntable['theme_config'];=0A=
        $column =3D &$pntable['theme_config_column'];=0A=
=0A=
        // Insert Data into _themes_config=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                      VALUES =
('pagewidth',$skinID,'"._ENPAGEWIDTH."','100%','')");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                      VALUES =
('lcolwidth',$skinID,'"._ENLCOLWIDTH."','140','')");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                      VALUES =
('rcolwidth',$skinID,'"._ENRCOLWIDTH."','170','')");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                      VALUES =
('indexcol',$skinID,'"._ENINDEXCOL."','1','')");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                      VALUES =
('righton',$skinID,'"._ENRIGHTON."','0','')");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                      VALUES =
('iblkwidth',$skinID,'"._ENINBLKWIDTH."','145','')");=0A=
=0A=
        // Setup the table and column info=0A=
        $table =3D $pntable['theme_layout'];=0A=
        $column =3D &$pntable['theme_layout_column'];=0A=
=0A=
        // Insert Data into _themes_layout=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES =
($skinID,'master1','master1.tpl')");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES =
($skinID,'master2','master2.tpl')");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES =
($skinID,'lsblock','lsblock.tpl')");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES =
($skinID,'rsblock','rsblock.tpl')");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($skinID,'table1','table1.tpl')");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($skinID,'table2','table2.tpl')");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES =
($skinID,'News-index','News-index.tpl')");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES =
($skinID,'News-article','News-article.tpl')");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES =
($skinID,'News-index2','News-index2.tpl')");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($skinID, 'topcenter', =
'topcenter2.tpl')");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($skinID, 'tcblock', =
'tcblock.tpl')");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($skinID, 'botcenter', =
'botcenter.tpl')");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($skinID, 'bcblock', =
'bcblock.tpl')");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($skinID, 'inblock', =
'inblock.tpl')");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($skinID, 'isblock', =
'isblock.tpl')");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($skinID, 'dsblock', =
'dsblock.tpl')");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($skinID, 'mainmenu', =
'mainmenu.tpl')");=0A=
=0A=
        // Setup the table and column info=0A=
        $table =3D $pntable['theme_zones'];=0A=
        $column =3D &$pntable['theme_zones_column'];=0A=
=0A=
        // Insert Data into _theme_zones=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($id,$skinID, '"._ENMASTER1."', =
'master1', 0, 1)");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($id,$skinID, '"._ENMASTER2."', =
'master2', 0, 1)");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($id,$skinID, =
'"._ENOPENTABLE1."', 'table1', 0, 1)");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($id,$skinID, =
'"._ENOPENTABLE2."', 'table2', 0, 1)");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($id,$skinID, '"._ENLEFTSIDEB."', =
'lsblock', 0, 1)");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($id,$skinID, =
'"._ENRIGHTSIDEB."', 'rsblock', 0, 1)");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($id,$skinID, '"._ENNEWSINDEX."', =
'News-index', 0, 1)");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($id,$skinID, '"._ENNEWSART."', =
'News-article', 0, 1)");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($id,$skinID, =
'"._ENNEWSINDEX2."', 'News-index2', 1, 0)");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($id,$skinID, =
'"._ENTOPCENTERBLOCK."', 'topcenter', 1, 0)");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($id,$skinID, =
'"._ENTOPCENTERBOX."', 'tcblock', 1, 0)");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($id,$skinID, =
'"._ENBOTCENTERBLOCK."', 'botcenter', 1, 0)");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($id,$skinID, =
'"._ENBOTCENTERBOX."', 'bcblock', 1, 0)");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($id,$skinID, '"._ENINNER."', =
'inblock', 1, 0)");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($id,$skinID, =
'"._ENDEFAULTSIDEB."', 'isblock', 1, 0)");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($id,$skinID, =
'"._ENDEFAULTSIDE."', 'dsblock', 1, 0)");=0A=
=0A=
        $dbconn->Execute("INSERT INTO $table=0A=
                                VALUES ($id,$skinID, '"._ENMAINMENUB."', =
'mainmenu', 1, 0)");=0A=
=0A=
=0A=
        // Report success=0A=
        return true;=0A=
}=0A=
=0A=
=0A=
////=0A=
// Delete a skin from the db=0A=
// @access                private=0A=
// @author                ApathyBoy=0A=
// @since                0.927                02-09-2002=0A=
// @param                none=0A=
// @return                bool true upon successful removal=0A=
function encompass_theme_delete($args)=0A=
{=0A=
        if (!pnSecAuthAction(0, 'Encompass', '::', ACCESS_EDIT))=0A=
        {=0A=
                return false;=0A=
        }=0A=
=0A=
        extract($args);=0A=
=0A=
        $skinName =3D $id;=0A=
        $skinID =3D pnModAPIFunc('Encompass','user','getSkinID',=0A=
                                                        array('skin' =
=3D> $skinName));=0A=
=0A=
        // delete from the db here=0A=
        // Setup DB handle=0A=
        list($dbconn) =3D pnDBGetConn();=0A=
        $pntable =3D pnDBGetTables();=0A=
=0A=
        // Setup the table and column info=0A=
        $table =3D $pntable['theme_skins'];=0A=
        $column =3D &$pntable['theme_skins_column'];=0A=
=0A=
        // Delete info from _theme_skins=0A=
        $dbconn->Execute("DELETE FROM $table WHERE =
$column[skin_id]=3D'$skinID'");=0A=
=0A=
        // Setup the table and column info=0A=
        $table =3D $pntable['theme_config'];=0A=
        $column =3D &$pntable['theme_config_column'];=0A=
=0A=
        // Delete info from _themes_config=0A=
        $dbconn->Execute("DELETE FROM $table WHERE =
$column[skin_id]=3D'$skinID'");=0A=
=0A=
        // Setup the table and column info=0A=
        $table =3D $pntable['theme_layout'];=0A=
        $column =3D &$pntable['theme_layout_column'];=0A=
=0A=
        // Delete info from _theme_layout=0A=
        $dbconn->Execute("DELETE FROM $table WHERE =
$column[skin_id]=3D'$skinID'");=0A=
=0A=
        // Setup the table and column info=0A=
        $table =3D $pntable['theme_zones'];=0A=
        $column =3D &$pntable['theme_zones_column'];=0A=
=0A=
        // Delete info from _theme_zones=0A=
        $dbconn->Execute("DELETE FROM $table WHERE =
$column[skin_id]=3D'$skinID'");=0A=
=0A=
        // Report success=0A=
        return true;=0A=
}=0A=
=0A=
=0A=
?>
------=_NextPart_000_000A_01C25D5D.C0D32540--