phpslash-commit Mailing List for phpSlash (Page 101)
Brought to you by:
joestewart,
nhruby
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(11) |
Nov
(59) |
Dec
(60) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(52) |
Feb
(77) |
Mar
(118) |
Apr
(76) |
May
(106) |
Jun
(145) |
Jul
(9) |
Aug
(15) |
Sep
(78) |
Oct
(83) |
Nov
(105) |
Dec
(51) |
2003 |
Jan
(105) |
Feb
(100) |
Mar
(111) |
Apr
(149) |
May
(95) |
Jun
(56) |
Jul
(8) |
Aug
(2) |
Sep
|
Oct
(22) |
Nov
(117) |
Dec
(6) |
2004 |
Jan
(1) |
Feb
|
Mar
(3) |
Apr
(25) |
May
|
Jun
(11) |
Jul
(26) |
Aug
(85) |
Sep
(119) |
Oct
(312) |
Nov
(271) |
Dec
(5) |
2005 |
Jan
(6) |
Feb
|
Mar
|
Apr
(12) |
May
(7) |
Jun
(8) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Joe S. <joe...@us...> - 2002-02-06 18:47:46
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv3535/phpslash-ft Modified Files: CHANGES Log Message: submitted patches Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.389 retrieving revision 1.390 diff -C2 -d -r1.389 -r1.390 *** CHANGES 2002/02/04 14:50:42 1.389 --- CHANGES 2002/02/06 18:47:43 1.390 *************** *** 13,16 **** --- 13,25 ---- 9 - Removal of something (kill -9 :) + 2002-Feb-06 12:30PM CST Joe Stewart <jo...@be...> + [B] - backend.php3 wasn't stripping all tags from description. + [W] - Block_render_rss.class - [ #512898 ] block_render_rss - title option + [B] - Block_render_skin.class - [ #512886 ] block_render_skin image url fix + [W] - Navbar.class - [ #512889 ] NavBar.class image url + [B] - Block.class - typo. + [B] - slash-all.sql - increment psl_block_seq in db_sequence. + Thanks Peter for the patches. + 2002-Feb-04 8:30AM CST Joe Stewart <jo...@be...> [B] - en.php3 was missing "User". Also added Spanish translation. |
From: Joe S. <joe...@us...> - 2002-02-04 14:50:45
|
Update of /cvsroot/phpslash/phpslash-ft/class/locale In directory usw-pr-cvs1:/tmp/cvs-serv32376/phpslash-ft/class/locale Modified Files: en.php3 Added Files: es.php3 Log Message: translation tweak --- NEW FILE: es.php3 --- <?php /* * es ( Spanish) Language file for PHPSlash * translations named using POSIX locale conventions ( en, es, de, etc) * * Please don't use HTML code here! * * Translated by / Traducio por Luis Mondesi <le...@ho...> * Comments? / ¿Comentarios? * NOTE: I tried to keep the spanish translation as modern as possible * without breaking traditional rules ... :-D I know Gabriel García * Márquez wants to modernize spanish, but, * I believe certain things are necessary. Read other comments within * this file. * Also, if you see any missing accent, feel free to add it! :-) */ $pslstrings = array( // about.php3 // article.php3 // backend.php3 // comment.php3 "No Subject Given" => "Ningún sujeto dado", "Re: " => "Re: ", "Anonymous" => "Anónimo", "Comments" => "Comentarios", "You didn't supply a good submit value" => "Ningún valor fue provisto", // commentShow.php3 // commentSubmit.php3 // config.php3 "Home" => "Principal", "Add Story" => "Añadir artículo", "Archives" => "Archivos", "Polls" => "Encuestas", "About" => "Acerca de nostros", "Topic" => "Asunto", "Story" => "Artículo", "Submission" => "Sumisión", "Section" => "Sección", "Block" => "Cuadro", "Poll" => "Encuesta", "Author" => "Autor", "Glossary" => "Glosario", "Mailing List" => "Lista de direcciones", "Variable" => "Variable", "Logging" => "Registro", "User" => "Usuario", // Luis Mondesi <le...@ho...> // Capital letters don't get accents: // (at least not in 'traditional' spanish) // functions.inc "NO TITLE" => "SIN TITULO", "@!#$" => "@!#$", // glossary.php3 // index.php3 // indextpl3col.php3 // login.php3 "%s logged out." => "%s sesión cerrada.", // mailinglist.php3 // poll.php3 "VOTE: " => "VOTO: ", "View Pollbooth" => "Ver encuestas", "%s Poll" => "%s Encuesta", // pollBooth.php3 // search.php3 "Searching %s" => "Buscando %s", "All Topics" => "Todos los asuntos", "All Sections" => "Todas las secciones", "All Authors" => "Todos los autores", // submisson.php3 "Thanks for this submission. We have it and will set our fearless editorial staff upon it right this second." => "Gracias por su envio. Nosotros lo hemos recibido y pondremos un valiente editador de nuestro grupo a cargo de él en este mismo momento.", "Something broke, I'm not sure what though??" => "¿¿Algo esta roto, pero no estoy seguro de qué??", "New Submission" => "Nuevo envio", // submissionAdmin.php3 // /admin files // authorAdmin "Error! Invalid Privileges" => "¡Error! Privilegios inválidos", "Sorry. You do not have the necessary privilege to view this page." => "Lo siento. Usted no tiene los privilegios necesarios para ver esta página.", // blockadmin.php3 // commentAdmin.php3 // glossaryAdmin.php3 // infologAdmin.php3 // mailinglistAdmin.php3 // pollAdmin.php3 // sectionAdmin.php3 // storyAdmin.php // submissionAdmin.php3 // topicAdmin.php3 // variableAdmin.php3 // /class files // Author.class // Block.class // Block_i.class // Block_render_cal.class "January" => "Enero", "February" => "Febrero", "March" => "Marzo", "April" => "Abril", "May" => "Mayo", "June" => "Junio", "July" => "Julio", "August" => "Agosto", // Luis Mondesi <le...@ho...> // Grabriel García Márquez [Cien Años de soledad. Nobel // Literature 198x] wants the P in from // of septiembre abolished... but for now // this is the right spanish way :-) "September" => "Septiembre", "October" => "Octubre", "November" => "Noviembre", "December" => "Diciembre", // Block_render_html.class // Block_render_poll.class // Block_render_query.class // Block_render_quote.class // Block_render_rss.class // Block_render_section.class // Block_render_topic.class // Block_render_url.class // Comment.class "Nested" => "Jerarquizado", "Threaded" => "Roscado", "Flat" => "Plano", // Luis Mondesi <le...@ho...> // Usually capital letters don't get // tildes :-) ... French people // do that, but this is spanish! "Index" => "Indice", "Bulk Delete" => "Borrar varios", "Show Pending" => "Mostrar pendientes", // Glossary.class "Add a new Term" => "Añadir un nuevo término", // Infolog.class // Mailinglist.class "Email Headline Updates" => "Enviar encabezados por correo electrónico", "You need to enter an email address" => "Necesita poner una dirección electrónica", "There was an error inserting your subscription information into the database." => "Hubo un error en la inserción de su subscripción a la base de datos.", "There was an error inserting your frequency data." => "Hubo un error en la inserción de los datos de su frecuencia.", "Thank you. You will receive a confirmation email soon to verify your subscription." => "Gracias. Pronto recibirá una confirmación por correo electrónico para verificar su subscripción.", "You have been successfully subscribed, but there was a problem sending your confirmation email. You should, however receive your newsletter soon." => "Su subscripción ha sido aceptada de forma exitosa, pero hubo un problema enviando su confirmación via correo electrónico. Usted de todas formas recibirá su boletín de noticias pronto.", "The email address '%s' is not found" => "La dirección electrónica '%s' no fue encontrada", "Email: '%s' is not found" => "La dirección electrónica: '%s' no fue encontrada", "Email: '%s' has been removed" => "La dirección electrónica: '%s' ha sido quitada", "Thank you. for your subscription to our site. If there is anything we can do to improve our service, please let us know!" => "¡Gracias por su subscripción a nuestra página!. Si hay algo que podemos hacer para mejorar nuestro servicio, por favor envie sus sugerencias ", "You've been removed from the mailing list, but there was a problem sending out the final email." => "Usted ha sido quitado de nuestra lista de direcciones, pero hubo un problema enviando su mensaje final.", "Unsubscribing all Mailing List Members" => "Borrando todos los miembros de la lista", "Now ignoring abort calls..." => "Ahora ignorando señales de aborto...", "Sending mail to the following users:" => "Enviando mensajes a los siguientes usuarios:", "Mail Sent Successfully!" => "¡Mensaje enviadas sin problemas!", "Error Sending Email!" => "¡Error enviando mensaje!", "You didn't give a email subject! Halting." => "¡Sujeto no provisto! Abortando.", // Navbar.class "Login" => "Registro", "Logout %s" => "Sesión cerrada %s", // Poll.class "Your vote has been registered" => "Su voto ha sido registrado", "Your vote hasn't been registered because there was no remote address: %s" => "Su voto no fue registrado porque no fue encontrada la dirección remota: %s", "Your vote hasn't been registered because you (or someone from your computer) has already voted." => "Su voto no fue registrado porque usted (o alguien que usa su ordenador) ya ha votado.", // Section.class // Story.class "More" => "Más", "Related Links" => "Enlaces relacionados", "Reply" => "Responder", "Also filed under" => "También llenado bajo", "comments" => "comentarios", "comment" => "comentario", "Comments?" => "¿Comentarios?", // Submission.class "Anonymous Coward" => "Covarde anónimo" // Topic.class // TopicBar.class // Variable.class ); ?> Index: en.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/locale/en.php3,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** en.php3 2001/12/19 20:00:41 1.5 --- en.php3 2002/02/04 14:50:42 1.6 *************** *** 77,81 **** "Logging" => "Logging", ! // functions.inc "NO TITLE" => --- 77,84 ---- "Logging" => "Logging", ! ! "User" => ! "User", ! // functions.inc "NO TITLE" => |
From: Joe S. <joe...@us...> - 2002-02-04 14:50:45
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv32376/phpslash-ft Modified Files: CHANGES Log Message: translation tweak Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.388 retrieving revision 1.389 diff -C2 -d -r1.388 -r1.389 *** CHANGES 2002/02/04 14:37:39 1.388 --- CHANGES 2002/02/04 14:50:42 1.389 *************** *** 13,17 **** 9 - Removal of something (kill -9 :) ! 2002-Feb-03 5:00PM EST nathan hruby <na...@ds...> [B] - slash-all.sql - changed 'God' to 'god' in the login instructions. [D] - Removed reference to seclevs. --- 13,21 ---- 9 - Removal of something (kill -9 :) ! 2002-Feb-04 8:30AM CST Joe Stewart <jo...@be...> ! [B] - en.php3 was missing "User". Also added Spanish translation. ! Thanks Luis! This should complete bug report #512685. ! ! 2002-Feb-04 8:30AM CST Joe Stewart <jo...@be...> [B] - slash-all.sql - changed 'God' to 'god' in the login instructions. [D] - Removed reference to seclevs. |
From: Joe S. <joe...@us...> - 2002-02-04 14:37:43
|
Update of /cvsroot/phpslash/phpslash-ft/doc/html In directory usw-pr-cvs1:/tmp/cvs-serv29401/phpslash-ft/doc/html Modified Files: phpslash.sgml Log Message: corrected login instructions Index: phpslash.sgml =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/doc/html/phpslash.sgml,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** phpslash.sgml 2002/02/02 15:27:46 1.13 --- phpslash.sgml 2002/02/04 14:37:39 1.14 *************** *** 433,437 **** NOTE: Do not delete the God account yet. First create an account for ! yourself with a Security Level of: 1000000. Then, post a story to the site. Next, delete that "Welcome to PHPSlash" story that was posted by god and NOW you can delete the god account. --- 433,437 ---- NOTE: Do not delete the God account yet. First create an account for ! yourself with all Security permissions. Then, post a story to the site. Next, delete that "Welcome to PHPSlash" story that was posted by god and NOW you can delete the god account. |
From: Joe S. <joe...@us...> - 2002-02-04 14:37:42
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv29401/phpslash-ft Modified Files: CHANGES Log Message: corrected login instructions Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.387 retrieving revision 1.388 diff -C2 -d -r1.387 -r1.388 *** CHANGES 2002/02/03 22:09:11 1.387 --- CHANGES 2002/02/04 14:37:39 1.388 *************** *** 14,17 **** --- 14,21 ---- 2002-Feb-03 5:00PM EST nathan hruby <na...@ds...> + [B] - slash-all.sql - changed 'God' to 'god' in the login instructions. + [D] - Removed reference to seclevs. + + 2002-Feb-03 5:00PM EST nathan hruby <na...@ds...> [W] - String fixin' continues. All php files now should behave better, this should be the last of them, but if you see an unquoted string, |
From: Joe S. <joe...@us...> - 2002-02-04 14:37:12
|
Update of /cvsroot/phpslash/phpslash-ft/tables/0.65 In directory usw-pr-cvs1:/tmp/cvs-serv29246 Modified Files: slash-all.sql Log Message: corrected login instructions Index: slash-all.sql =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/tables/0.65/slash-all.sql,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** slash-all.sql 2002/02/01 21:38:59 1.8 --- slash-all.sql 2002/02/04 14:37:08 1.9 *************** *** 708,714 **** INSERT INTO psl_story (story_id, user_id, title, dept, time, intro_text, body_text, hits, topic_cache) VALUES ( '19', '1', 'Congratulations! It Works!', 'new-stuff-is-cool', '2000-12-04 17:29:56', 'Welcome to phpslash! <br> <br> ! Now, login to the Admin Section withthe default username of \'God\' and password of \'Password\' and delete this story! <br> <br> ! Then, add yourself as an author (remember to give yourself a seclev of 100000) and logout / login again. ', '', '1', ''); # -------------------------------------------------------- --- 708,714 ---- INSERT INTO psl_story (story_id, user_id, title, dept, time, intro_text, body_text, hits, topic_cache) VALUES ( '19', '1', 'Congratulations! It Works!', 'new-stuff-is-cool', '2000-12-04 17:29:56', 'Welcome to phpslash! <br> <br> ! Now, login to the Admin Section with the default username of \'god\' and password of \'password\' and delete this story! <br> <br> ! Then, add yourself as an author (remember to give yourself all Security permissions) and logout / login again. ', '', '1', ''); # -------------------------------------------------------- |
From: nathan h. <nh...@us...> - 2002-02-03 22:09:15
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory usw-pr-cvs1:/tmp/cvs-serv15746/public_html Modified Files: about.php3 admin.php3 article.php3 backend.php3 censor.php3 config.php3 glossary.php3 login.php3 poll.php3 search.php3 submission.php3 Log Message: String fixin' contiunues Index: about.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/about.php3,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** about.php3 2001/12/14 22:14:36 1.13 --- about.php3 2002/02/03 22:09:12 1.14 *************** *** 9,22 **** $xsiteobject = "About Page"; #Defines The META TAG Page Type $header = getHeader($pagetitle,$xsiteobject); $footer = getFooter(); ! $about_templ = new Template($_PSL[templatedir]); $about_templ->set_file(array( ! main => "about.tpl" )); $about_templ->set_var(array( ! HEADER => $header, ! FOOTER => $footer )); --- 9,24 ---- $xsiteobject = "About Page"; #Defines The META TAG Page Type + // TODO: nh asks: Shouldn't this be slashhead() and slashfoot()? + $header = getHeader($pagetitle,$xsiteobject); $footer = getFooter(); ! $about_templ = new Template($_PSL['templatedir']); $about_templ->set_file(array( ! 'main' => "about.tpl" )); $about_templ->set_var(array( ! 'HEADER' => $header, ! 'FOOTER' => $footer )); Index: admin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin.php3,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** admin.php3 2002/01/09 17:05:34 1.29 --- admin.php3 2002/02/03 22:09:12 1.30 *************** *** 1,4 **** <?php ! Header("Location: login.php3"); exit; --- 1,4 ---- <?php ! // $Id$ Header("Location: login.php3"); exit; Index: article.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/article.php3,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** article.php3 2002/01/15 21:50:38 1.57 --- article.php3 2002/02/03 22:09:12 1.58 *************** *** 4,8 **** $pagetitle = "Articles"; // The name to be displayed in the header ! $xsiteobject = "Articles"; // Defines The META TAG Page Type require("config.php3"); --- 4,8 ---- $pagetitle = "Articles"; // The name to be displayed in the header ! $xsiteobject = "Articles"; // Defines The META TAG Page Type require("config.php3"); *************** *** 29,38 **** $section = "Home"; } ! $ary[section] = $section; } $story_html = $story->getStory($story_id, "full", $ary); ! $t = new Template($_PSL[templatedir], "remove"); if ($story_html) { --- 29,38 ---- $section = "Home"; } ! $ary['section'] = $section; } $story_html = $story->getStory($story_id, "full", $ary); ! $t = new Template($_PSL['templatedir'], "remove"); if ($story_html) { *************** *** 57,73 **** $t->set_file(article, "article-pf.tpl"); $t->set_var(array( ! STORY_URL => $_PSL[rooturl]."/article.php3?story_id=".$story_id, ! SITENAME => $_PSL[site_name], ! PAGETITLE => $pagetitle, ! TITLE => $ttitle, ! NAME => $story->story_ary["name"], ! DATEF => $story->story_ary["datef"], ! DEPT => $story->story_ary["dept"], ! INTRO_TEXT => $p_intro_text, ! BODY_TEXT => $p_body_text, ! XSITEOBJECT => $xsiteobject )); ! $t->parse(PAGE, article); ! $t->p(PAGE); break; --- 57,73 ---- $t->set_file(article, "article-pf.tpl"); $t->set_var(array( ! 'STORY_URL' => $_PSL['rooturl']."/article.php3?story_id=".$story_id, ! 'SITENAME' => $_PSL['site_name'], ! 'PAGETITLE' => $pagetitle, ! 'TITLE' => $ttitle, ! 'NAME' => $story->story_ary["name"], ! 'DATEF' => $story->story_ary["datef"], ! 'DEPT' => $story->story_ary["dept"], ! 'INTRO_TEXT' => $p_intro_text, ! 'BODY_TEXT' => $p_body_text, ! 'XSITEOBJECT' => $xsiteobject )); ! $t->parse('PAGE', 'article'); ! $t->p('PAGE'); break; *************** *** 128,157 **** /* Now the comments */ ! $cmtary[mode] = $mode; ! $cmtary[order] = $order; ! $cmtary[story_id] = $story_id; ! $cmtary[parent_id] = $parent_id; $cmt = new Comment($cmtary); $comments = $cmt->getAllComments($cmtary); ! $t->set_var(COMMENTS, $comments); /* Display the story */ $t->set_var(array( ! TITLE => $title, ! BREADCRUMB => $breadcrumb, ! STORY_ID => $story_id, ! IMAGEDIR => $_PSL[imageurl], ! STORY_COLUMN => $emailform."\n".$story_html."\n".$comments, ! LEFT_BLOCK_COLUMN => $leftblocks, ! CENTER__TOP_BLOCK_COLUMN => $centertopblocks, ! RIGHT_BLOCK_COLUMN => $rightblocks, ! // HEADER => $header, ! // EMAILFORM => $emailform, ! // STORY => $story_html, ! // ARROWS => $arrows, ! // FOOTER => $footer, ! // RELATED => $related, )); --- 128,157 ---- /* Now the comments */ ! $cmtary['mode'] = $mode; ! $cmtary['order'] = $order; ! $cmtary['story_id'] = $story_id; ! $cmtary['parent_id'] = $parent_id; $cmt = new Comment($cmtary); $comments = $cmt->getAllComments($cmtary); ! $t->set_var('COMMENTS', $comments); /* Display the story */ $t->set_var(array( ! 'TITLE' => $title, ! 'BREADCRUMB' => $breadcrumb, ! 'STORY_ID' => $story_id, ! 'IMAGEDIR' => $_PSL['imageurl'], ! 'STORY_COLUMN' => $emailform."\n".$story_html."\n".$comments, ! 'LEFT_BLOCK_COLUMN' => $leftblocks, ! 'CENTER__TOP_BLOCK_COLUMN' => $centertopblocks, ! 'RIGHT_BLOCK_COLUMN' => $rightblocks, ! // 'HEADER' => $header, ! // 'EMAILFORM' => $emailform, ! // 'STORY' => $story_html, ! // 'ARROWS' => $arrows, ! // 'FOOTER' => $footer, ! // 'RELATED' => $related, )); *************** *** 166,171 **** slashhead($ttitle,$_PSL['metatags']); ! $t->parse(PAGE, article); ! $t->p(PAGE); slashfoot(); --- 166,171 ---- slashhead($ttitle,$_PSL['metatags']); ! $t->parse('PAGE', 'article'); ! $t->p('PAGE'); slashfoot(); *************** *** 175,180 **** slashhead("Article",$xsiteobject); titlebar("100%", "I´m sorry, no Article Number $story_id found."); ! echo "<BR><BR>Maybe you're looking for a Poll? Try this <A HREF=\"" . $_PSL[rooturl] . "/poll.php3?submit=viewbooth&question_id=$story_id\">link</A>.<BR><BR>\n"; ! echo "If that doesn't work, then use the <a href=\"" . $_PSL[rooturl] . "/search.php3\">Search</A> Page."; slashfoot(); } --- 175,180 ---- slashhead("Article",$xsiteobject); titlebar("100%", "I´m sorry, no Article Number $story_id found."); ! echo "<BR><BR>Maybe you're looking for a Poll? Try this <A HREF=\"" . $_PSL['rooturl'] . "/poll.php3?submit=viewbooth&question_id=$story_id\">link</A>.<BR><BR>\n"; ! echo "If that doesn't work, then use the <a href=\"" . $_PSL['rooturl'] . "/search.php3\">Search</A> Page."; slashfoot(); } Index: backend.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/backend.php3,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** backend.php3 2001/09/06 17:18:22 1.17 --- backend.php3 2002/02/03 22:09:12 1.18 *************** *** 2,7 **** /* backend.php3 -> Methods for exporting information */ ! /* Id:$ */ /* pass the query in the "Source Url" form field in the format of: * --- 2,11 ---- /* backend.php3 -> Methods for exporting information */ ! /* $Id$ */ + /* TODO: add ini_set() call to turn all error reporting off unless $_PSL['debug'] + * is set. Errors from php will corrupt the XML format and null the feed. + */ + /* pass the query in the "Source Url" form field in the format of: * *************** *** 43,47 **** $pagetitle="Backend"; # The name to be displayed in the header ! $xsiteobject = "Backend"; #This Defines The META Tag Object Type require("config.php3"); --- 47,51 ---- $pagetitle="Backend"; # The name to be displayed in the header ! $xsiteobject = "Backend"; #This Defines The META Tag Object Type require("config.php3"); *************** *** 63,70 **** if(!$max) { $max= 15; ! $ary[max] = 15; } ! $site_homesection = $_PSL[site_homesection]; if ($section == "") { $section = $site_homesection; --- 67,74 ---- if(!$max) { $max= 15; ! $ary['max'] = 15; } ! $site_homesection = $_PSL['site_homesection']; if ($section == "") { $section = $site_homesection; *************** *** 76,81 **** $stories = $story->extractStories($ary); ! $site_name = $_PSL[site_name]; ! $site_title = $_PSL[site_title]; --- 80,85 ---- $stories = $story->extractStories($ary); ! $site_name = $_PSL['site_name']; ! $site_title = $_PSL['site_title']; *************** *** 130,134 **** ! $template = new Template($_PSL[templatedir]); $template->debug = 0; $template->set_file($template_ary); --- 134,138 ---- ! $template = new Template($_PSL['templatedir']); $template->debug = 0; $template->set_file($template_ary); *************** *** 137,148 **** $template->set_var(array( ! SITE_NAME => $site_name, ! SITE_TITLE => $site_title, ! SITE_SLOGAN => $site_slogan, ! SITE_HOST => $HTTP_HOST, ! PHP_SELF => $PHP_SELF, ! ROOTDIR => $_PSL[rooturl], ! DATE => $date, ! IMAGEDIR => $_PSL[imageurl] )); --- 141,152 ---- $template->set_var(array( ! 'SITE_NAME' => $site_name, ! 'SITE_TITLE' => $site_title, ! 'SITE_SLOGAN' => $site_slogan, ! 'SITE_HOST' => $HTTP_HOST, // TODO: nh asks: Will this be around with register_globals=Off? ! 'PHP_SELF' => $PHP_SELF, // TODO: Make this use $_PSL['phpself'] ! 'ROOTDIR' => $_PSL['rooturl'], ! 'DATE' => $date, ! 'IMAGEDIR' => $_PSL['imageurl'] )); *************** *** 172,188 **** $template->set_var(array( ! STORY_ID => $stories[$i]["story_id"], ! TITLE => $stories[$i]["title"], ! INTRO_TEXT => $description, ! TARGET => $target, ! COUNT => $max, ! IDX => $i, ! DATEF => $stories[$i]["datef"] )); $template->parse("stories", "each_story", true); } ! $template->parse(OUT,"storiesbackend"); ! $template->p(OUT); ?> --- 176,192 ---- $template->set_var(array( ! 'STORY_ID' => $stories[$i]["story_id"], ! 'TITLE' => $stories[$i]["title"], ! 'INTRO_TEXT' => $description, ! 'TARGET' => $target, ! 'COUNT' => $max, ! 'IDX' => $i, ! 'DATEF' => $stories[$i]["datef"] )); $template->parse("stories", "each_story", true); } ! $template->parse('OUT',"storiesbackend"); ! $template->p('OUT'); ?> Index: censor.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/censor.php3,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** censor.php3 2001/07/02 17:26:45 1.1 --- censor.php3 2002/02/03 22:09:12 1.2 *************** *** 5,11 **** * < ?php * $profan = array( ! * badword, ! * badimuswordimus, ! * "lots more badwords" * ); * ? > --- 5,11 ---- * < ?php * $profan = array( ! * 'badword', ! * 'badimuswordimus', ! * 'lots more badwords' * ); * ? > Index: config.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config.php3,v retrieving revision 1.122 retrieving revision 1.123 diff -C2 -d -r1.122 -r1.123 *** config.php3 2002/02/03 02:49:40 1.122 --- config.php3 2002/02/03 22:09:12 1.123 *************** *** 91,95 **** $_PSL['default_pending'] = false; // decides if new comments are marked pending ! // basically allows you to moderate the posts. $_PSL['poll_max_answers'] = 8; // When creating a poll, you have a question --- 91,95 ---- $_PSL['default_pending'] = false; // decides if new comments are marked pending ! // basically allows you to moderate the posts. $_PSL['poll_max_answers'] = 8; // When creating a poll, you have a question *************** *** 440,458 **** /* ============= Things to deprecate ============= */ if ($sitename=="") $sitename = $_PSL['site_name']; if ($siteowner=="") $siteowner = $_PSL['site_owner']; ! $basedir = $_PSL['basedir']; $templatedir = $_PSL['templatedir']; ! $classdir = $_PSL['classdir']; $rootdir = $_PSL['rooturl']; ! $admindir = $_PSL['adminurl']; ! $imagedir = $_PSL['imageurl']; $debug = $_PSL['debug']; $debug_type = $_PSL['debug_type']; ! $infolog_enable = $_PSL['use_infolog']; ! $default_pending = $_PSL['default_pending']; ! $show_admin_on_navbar = $_PSL['show_admin_on_navbar']; ! $max_poll_answers = $_PSL['poll_max_answers']; ?> --- 440,476 ---- /* ============= Things to deprecate ============= */ + // ---------------------------------------------------------- + // Ref'ed in poll.php3 and admin/pollAdmin.php3 if ($sitename=="") $sitename = $_PSL['site_name']; + + // ---------------------------------------------------------- + // Ref'ed in comment.php3 if ($siteowner=="") $siteowner = $_PSL['site_owner']; ! // ---------------------------------------------------------- ! // Ref'ed in Block_i $templatedir = $_PSL['templatedir']; ! ! // ---------------------------------------------------------- ! // Ref'ed in Variable.class but isn't that toast? $rootdir = $_PSL['rooturl']; ! ! // ---------------------------------------------------------- ! // both ref'ed in functions.inc $debug = $_PSL['debug']; $debug_type = $_PSL['debug_type']; ! ! // ---------------------------------------------------------- ! // The following can be deleted ! // ---------------------------------------------------------- ! // $infolog_enable = $_PSL['use_infolog']; ! // $default_pending = $_PSL['default_pending']; ! // $show_admin_on_navbar = $_PSL['show_admin_on_navbar']; ! // $max_poll_answers = $_PSL['poll_max_answers']; ! // $admindir = $_PSL['adminurl']; ! // $imagedir = $_PSL['imageurl']; ! // $classdir = $_PSL['classdir']; ! // $basedir = $_PSL['basedir']; ! // ---------------------------------------------------------- ?> Index: glossary.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/glossary.php3,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** glossary.php3 2001/05/16 19:19:17 1.9 --- glossary.php3 2002/02/03 22:09:12 1.10 *************** *** 3,8 **** /* $Id$ */ $pagetitle = "Glossary Administration"; // header title ! $xsiteobject = "Administration"; // Defines The META TAG Page Type require("config.php3"); --- 3,9 ---- /* $Id$ */ + // TODO: nh asks: Is this really administration anymore? $pagetitle = "Glossary Administration"; // header title ! $xsiteobject = "Administration"; // Defines The META TAG Page Type require("config.php3"); *************** *** 27,31 **** $glossary = new Glossary; ! $glossary->searchGlossary($search); slashfoot(); --- 28,32 ---- $glossary = new Glossary; ! $glossary->searchGlossary($search); // TODO: USE HTTP_*VARS, not a registered global slashfoot(); Index: login.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/login.php3,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** login.php3 2002/02/02 21:01:20 1.13 --- login.php3 2002/02/03 22:09:12 1.14 *************** *** 7,11 **** if (isset($HTTP_POST_VARS['cancel'])) { ! Header("Location: " . $_PSL[rooturl]); // go home die("\n"); // Kill script if not dead already, possible memory leak } --- 7,11 ---- if (isset($HTTP_POST_VARS['cancel'])) { ! Header("Location: " . $_PSL['rooturl']); // go home die("\n"); // Kill script if not dead already, possible memory leak } *************** *** 14,22 **** $username = $auth->auth['uname']; $auth->auth["error"] = sprintf(pslgetText("%s logged out."), $username); ! $auth->auth[uid] = "nobody"; ! $auth->auth[perm] = ""; } ! $auth->login_if(!$perm->have_perm(user)); // Objects --- 14,22 ---- $username = $auth->auth['uname']; $auth->auth["error"] = sprintf(pslgetText("%s logged out."), $username); ! $auth->auth['uid'] = 'nobody'; ! $auth->auth['perm'] = ""; } ! $auth->login_if(!$perm->have_perm('user')); // Objects *************** *** 33,48 **** } /* defaults for main "index" page */ ! if ((!$section) AND (!$section_id)){ ! $section = $_PSL[site_homesection]; if(!$section) { $section = "Home"; } ! $ary[section] = $section; } else { $pagetitle .= " - $section"; } ! $ary[section] = "Admin"; $breadcrumb = breadcrumb( $ary); --- 33,49 ---- } + // TODO: make the below use $HTTP_*_VARS /* defaults for main "index" page */ ! if ((!$section) AND (!$section_id)) { ! $section = $_PSL['site_homesection']; if(!$section) { $section = "Home"; } ! $ary['section'] = $section; } else { $pagetitle .= " - $section"; } ! $ary['section'] = "Admin"; $breadcrumb = breadcrumb( $ary); *************** *** 51,59 **** slashhead($pagetitle,$_PSL['metatags']); ! $allstories = $story->getStories($ary); ! $leftblocks = $block->getBlocks($ary, "left"); ! $centerblocks = $block->getBlocks($ary, "center"); $rightblocks = $block->getBlocks($ary, "right"); if (empty($leftblocks)) { if (empty($rightblocks)) { --- 52,61 ---- slashhead($pagetitle,$_PSL['metatags']); ! $allstories = $story->getStories($ary); ! $leftblocks = $block->getBlocks($ary, "left"); ! $centerblocks = $block->getBlocks($ary, "center"); $rightblocks = $block->getBlocks($ary, "right"); + // TODO: Please tell me what the below does :) if (empty($leftblocks)) { if (empty($rightblocks)) { *************** *** 75,96 **** } ! $template = new Template($_PSL[templatedir]); $template->debug = 0; $template->set_file(array( ! index => $tplfile //"index3col.tpl" )); $template->set_var(array( ! ROOTDIR => $_PSL[rooturl], ! IMAGEDIR => $_PSL[imageurl], ! BREADCRUMB => $breadcrumb, ! STORY_COLUMN => $allstories, ! LEFT_BLOCK_COLUMN => $leftblocks, ! CENTER_BLOCK_COLUMN => $centerblocks, ! RIGHT_BLOCK_COLUMN => $rightblocks )); ! $template->parse(OUT,"index"); ! $template->p(OUT); slashfoot(); --- 77,98 ---- } ! $template = new Template($_PSL['templatedir']); $template->debug = 0; $template->set_file(array( ! 'index' => $tplfile //"index3col.tpl" )); $template->set_var(array( ! 'ROOTDIR' => $_PSL['rooturl'], ! 'IMAGEDIR' => $_PSL['imageurl'], ! 'BREADCRUMB' => $breadcrumb, ! 'STORY_COLUMN' => $allstories, ! 'LEFT_BLOCK_COLUMN' => $leftblocks, ! 'CENTER_BLOCK_COLUMN' => $centerblocks, ! 'RIGHT_BLOCK_COLUMN' => $rightblocks )); ! $template->parse('OUT',"index"); ! $template->p('OUT'); slashfoot(); Index: poll.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/poll.php3,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** poll.php3 2001/08/04 19:48:40 1.7 --- poll.php3 2002/02/03 22:09:12 1.8 *************** *** 11,14 **** --- 11,15 ---- slashhead($pagetitle,$xsiteobject); + // TODO: Make this work with $HTTP_*_VARS /* the comment stuff is using "story_id" so we have to funky fix it here. */ *************** *** 25,31 **** /* setting up the possible comment variables... */ ! $cmtary[mode] = $mode; ! $cmtary[order] = $order; ! $cmtary[question_id] = $question_id; switch ($submit) { --- 26,32 ---- /* setting up the possible comment variables... */ ! $cmtary['mode'] = $mode; ! $cmtary['order'] = $order; ! $cmtary['question_id'] = $question_id; switch ($submit) { Index: search.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/search.php3,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** search.php3 2002/01/28 15:22:23 1.42 --- search.php3 2002/02/03 22:09:12 1.43 *************** *** 3,6 **** --- 3,8 ---- /* $Id$ */ + // TODO: search.php3 needs to have it's logic ripped out and put into an object + $pagetitle = "Search"; $xsiteobject = "Search Page"; #Defines The META TAG Page Type *************** *** 8,14 **** page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); ! $maxsearchresults = $_PSL[search_maxresults]; ! if ($HTTP_GET_VARS[use_comments] == 'on' && $_PSL[allow_comment_search]) { $search_comments = TRUE; } else { --- 10,16 ---- page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); ! $maxsearchresults = $_PSL['search_maxresults']; ! if ($HTTP_GET_VARS['use_comments'] == 'on' && $_PSL['allow_comment_search']) { $search_comments = TRUE; } else { *************** *** 154,163 **** $templ->set_var (array ( ! TOPIC_IMAGE_SRC => $_PSL[imageurl]."/topics/$topic_image_name", ! TOPIC_WIDTH => $topic_image_width, ! TOPIC_HEIGHT => $topic_image_height, ! TOPIC_ALT_TEXT => $topic_alttext, ! QUERY_STRING => $query, ! ACTION_URL => $_PSL[phpself] )); --- 156,165 ---- $templ->set_var (array ( ! 'TOPIC_IMAGE_SRC' => $_PSL['imageurl']."/topics/$topic_image_name", ! 'TOPIC_WIDTH' => $topic_image_width, ! 'TOPIC_HEIGHT' => $topic_image_height, ! 'TOPIC_ALT_TEXT' => $topic_alttext, ! 'QUERY_STRING' => $query, ! 'ACTION_URL' => $_PSL['phpself'] )); *************** *** 166,176 **** $templ->set_block ("searchpage", "each_topic", "topic_block"); $templ->set_var (array ( ! TOPIC_VALUE => "", ! TOPIC_TEXT => pslgetText("All Topics") )); if ($search_topic_id == "") { ! $templ->set_var (TOPIC_SELECTED, "selected=\"selected\""); } else { ! $templ->set_var (TOPIC_SELECTED, ""); } $templ->parse ("topic_block", "each_topic", true); --- 168,180 ---- $templ->set_block ("searchpage", "each_topic", "topic_block"); $templ->set_var (array ( ! 'TOPIC_VALUE' => "", ! 'TOPIC_TEXT' => pslgetText("All Topics") )); + + // TODO: Move quotes below into template if ($search_topic_id == "") { ! $templ->set_var ('TOPIC_SELECTED', "selected=\"selected\""); } else { ! $templ->set_var ('TOPIC_SELECTED', ""); } $templ->parse ("topic_block", "each_topic", true); *************** *** 184,195 **** while ($sl_q->next_record()) { $templ->set_var (array ( ! TOPIC_VALUE => $sl_q->Record[topic_id], ! TOPIC_TEXT => $sl_q->Record[topic_name] )); ! if ($search_topic_id == $sl_q->Record[topic_id]) { ! $templ->set_var (TOPIC_SELECTED, "selected=\"selected\""); } else { ! $templ->set_var (TOPIC_SELECTED, ""); } $templ->parse( "topic_block", "each_topic", true); --- 188,199 ---- while ($sl_q->next_record()) { $templ->set_var (array ( ! 'TOPIC_VALUE' => $sl_q->Record['topic_id'], ! 'TOPIC_TEXT' => $sl_q->Record['topic_name'] )); ! if ($search_topic_id == $sl_q->Record['topic_id']) { ! $templ->set_var ('TOPIC_SELECTED', "selected=\"selected\""); } else { ! $templ->set_var ('TOPIC_SELECTED', ""); } $templ->parse( "topic_block", "each_topic", true); *************** *** 200,210 **** $templ->set_block ("searchpage", "each_section", "section_block"); $templ->set_var (array ( ! SECTION_VALUE => "", ! SECTION_TEXT => pslgetText("All Sections") )); if ($search_section_id == "") { ! $templ->set_var (SECTION_SELECTED, "selected=\"selected\""); } else { ! $templ->set_var (SECTION_SELECTED, ""); } $templ->parse ("section_block", "each_section", true); --- 204,214 ---- $templ->set_block ("searchpage", "each_section", "section_block"); $templ->set_var (array ( ! 'SECTION_VALUE' => "", ! 'SECTION_TEXT' => pslgetText("All Sections") )); if ($search_section_id == "") { ! $templ->set_var ('SECTION_SELECTED', "selected=\"selected\""); } else { ! $templ->set_var ('SECTION_SELECTED', ""); } $templ->parse ("section_block", "each_section", true); *************** *** 218,229 **** while ($sl_q->next_record()) { $templ->set_var (array ( ! SECTION_VALUE => $sl_q->Record[section_id], ! SECTION_TEXT => $sl_q->Record[section_name] )); ! if ($search_section_id == $sl_q->Record[section_id]) { ! $templ->set_var (SECTION_SELECTED, "selected=\"selected\""); } else { ! $templ->set_var (SECTION_SELECTED, ""); } $templ->parse ("section_block", "each_section", true); --- 222,233 ---- while ($sl_q->next_record()) { $templ->set_var (array ( ! 'SECTION_VALUE' => $sl_q->Record['section_id'], ! 'SECTION_TEXT' => $sl_q->Record['section_name'] )); ! if ($search_section_id == $sl_q->Record['section_id']) { ! $templ->set_var ('SECTION_SELECTED', "selected=\"selected\""); } else { ! $templ->set_var ('SECTION_SELECTED', ""); } $templ->parse ("section_block", "each_section", true); *************** *** 234,244 **** $templ->set_block ("searchpage", "each_author", "author_block"); $templ->set_var (array ( ! AUTHOR_VALUE => "", ! AUTHOR_TEXT => pslgetText("All Authors") )); if ($search_author_id == "") { ! $templ->set_var (AUTHOR_SELECTED, "selected=\"selected\""); } else { ! $templ->set_var (AUTHOR_SELECTED, ""); } $templ->parse ("author_block", "each_author", true); --- 238,248 ---- $templ->set_block ("searchpage", "each_author", "author_block"); $templ->set_var (array ( ! 'AUTHOR_VALUE' => "", ! 'AUTHOR_TEXT' => pslgetText("All Authors") )); if ($search_author_id == "") { ! $templ->set_var ('AUTHOR_SELECTED', "selected=\"selected\""); } else { ! $templ->set_var ('AUTHOR_SELECTED', ""); } $templ->parse ("author_block", "each_author", true); *************** *** 252,263 **** while ($sl_q->next_record()) { $templ->set_var (array ( ! AUTHOR_VALUE => $sl_q->Record[author_id], ! AUTHOR_TEXT => $sl_q->Record[author_name] )); ! if ($search_author_id == $sl_q->Record[author_id]) { ! $templ->set_var (AUTHOR_SELECTED, "selected=\"selected\""); } else { ! $templ->set_var (AUTHOR_SELECTED, ""); } $templ->parse( "author_block", "each_author", true ); --- 256,267 ---- while ($sl_q->next_record()) { $templ->set_var (array ( ! 'AUTHOR_VALUE' => $sl_q->Record['author_id'], ! 'AUTHOR_TEXT' => $sl_q->Record['author_name'] )); ! if ($search_author_id == $sl_q->Record['author_id']) { ! $templ->set_var ('AUTHOR_SELECTED', "selected=\"selected\""); } else { ! $templ->set_var ('AUTHOR_SELECTED', ""); } $templ->parse( "author_block", "each_author", true ); *************** *** 275,278 **** --- 279,283 ---- $templ->set_file (previous_matches_file, "searchPrevMatches.tpl"); $templ->parse (previous_matches, previous_matches_file); + // TODO make use $_PSL['phpself'] $prev_matches_url = "$PHP_SELF?min=" . ($min - $maxsearchresults); *************** *** 288,295 **** $templ->set_var (array ( ! PREV_MATCHES_URL => $prev_matches_url, ! PREV_COUNT => $min )); ! $templ->parse (MATCHES, previous_matches, true); } --- 293,300 ---- $templ->set_var (array ( ! 'PREV_MATCHES_URL' => $prev_matches_url, ! 'PREV_COUNT' => $min )); ! $templ->parse ('MATCHES', 'previous_matches', true); } *************** *** 364,368 **** /* Should we use num_rows() or sql COUNT? --Daniel Serodio */ if ($sl_q->num_rows() != 0) { ! $templ->set_file (listed_matches, "searchMatch.tpl"); $templ->set_block ("listed_matches", "each_match", "match_block"); --- 369,373 ---- /* Should we use num_rows() or sql COUNT? --Daniel Serodio */ if ($sl_q->num_rows() != 0) { ! $templ->set_file ('listed_matches', "searchMatch.tpl"); $templ->set_block ("listed_matches", "each_match", "match_block"); *************** *** 371,380 **** while ($sl_q->next_record ()) { $templ->set_var (array ( ! STORY_URL => $_PSL[rooturl] . "/article.php3?story_id=".$sl_q->Record[story_id], ! STORY_TITLE => $sl_q->Record[title], ! AUTHOR_URL => str_html($sl_q->Record[url]), ! AUTHOR_NAME => $sl_q->Record[author_name], ! DATE => $sl_q->Record[dateformat], ! COMMENTCOUNT => $sl_q->Record[commentcount] )); $templ->parse ("match_block", "each_match", true); --- 376,385 ---- while ($sl_q->next_record ()) { $templ->set_var (array ( ! 'STORY_URL' => $_PSL['rooturl'] . "/article.php3?story_id=".$sl_q->Record['story_id'], ! 'STORY_TITLE' => $sl_q->Record['title'], ! 'AUTHOR_URL' => str_html($sl_q->Record['url']), ! 'AUTHOR_NAME' => $sl_q->Record['author_name'], ! 'DATE' => $sl_q->Record['dateformat'], ! 'COMMENTCOUNT' => $sl_q->Record['commentcount'] )); $templ->parse ("match_block", "each_match", true); *************** *** 386,392 **** $min += $maxsearchresults; ! $templ->set_file (more_matches_file, "searchMoreMatches.tpl"); ! $templ->parse (more_matches, more_matches_file); ! $more_matches_url = $_PSL[phpself]."?min=$min"; /* Only put the necessary stuff on the query URL */ --- 391,397 ---- $min += $maxsearchresults; ! $templ->set_file ('more_matches_file', "searchMoreMatches.tpl"); ! $templ->parse ('more_matches', 'more_matches_file'); ! $more_matches_url = $_PSL['phpself']."?min=$min"; /* Only put the necessary stuff on the query URL */ *************** *** 400,414 **** $more_matches_url .= "&author_id=$author_id"; ! $templ->set_var (MORE_MATCHES_URL, $more_matches_url); ! $templ->parse (MATCHES, listed_matches, true); ! $templ->parse (MATCHES, more_matches, true); } else { ! $templ->parse (MATCHES, listed_matches, true); } } else { // num_rows == 0 ! $templ->set_file (no_matches, "searchNoMatch.tpl"); ! $templ->parse (MATCHES, no_matches); } --- 405,419 ---- $more_matches_url .= "&author_id=$author_id"; ! $templ->set_var ('MORE_MATCHES_URL', $more_matches_url); ! $templ->parse ('MATCHES', 'listed_matches', true); ! $templ->parse ('MATCHES', 'more_matches', true); } else { ! $templ->parse ('MATCHES', 'listed_matches', true); } } else { // num_rows == 0 ! $templ->set_file ('no_matches', "searchNoMatch.tpl"); ! $templ->parse ('MATCHES', 'no_matches'); } Index: submission.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/submission.php3,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** submission.php3 2001/08/16 17:30:45 1.4 --- submission.php3 2002/02/03 22:09:12 1.5 *************** *** 51,55 **** slashfoot(); ! PAGE_close(); ?> --- 51,55 ---- slashfoot(); ! page_close(); ?> |
From: nathan h. <nh...@us...> - 2002-02-03 22:09:14
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/admin In directory usw-pr-cvs1:/tmp/cvs-serv15746/public_html/admin Modified Files: infologAdmin.php3 sectionAdmin.php3 storyAdmin.php3 submissionAdmin.php3 Log Message: String fixin' contiunues Index: infologAdmin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/infologAdmin.php3,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** infologAdmin.php3 2002/02/01 04:23:52 1.3 --- infologAdmin.php3 2002/02/03 22:09:12 1.4 *************** *** 10,14 **** page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); ! require($_PSL[classdir] . '/Infolog.class'); $log = new Infolog; --- 10,14 ---- page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); ! require($_PSL['classdir'] . '/Infolog.class'); $log = new Infolog; Index: sectionAdmin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/sectionAdmin.php3,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sectionAdmin.php3 2002/02/01 04:23:52 1.3 --- sectionAdmin.php3 2002/02/03 22:09:12 1.4 *************** *** 57,63 **** # echo "DESC: $description[$key]<BR>\n"; ! $ary[section_id] = $section_id[$key]; ! $ary[section_name] = $section_name[$key]; ! $ary[description] = $description[$key]; $section->saveSection($ary); --- 57,63 ---- # echo "DESC: $description[$key]<BR>\n"; ! $ary['section_id'] = $section_id[$key]; ! $ary['section_name'] = $section_name[$key]; ! $ary['description'] = $description[$key]; $section->saveSection($ary); *************** *** 79,83 **** slashfoot(); ! PAGE_close(); ?> --- 79,83 ---- slashfoot(); ! page_close(); ?> Index: storyAdmin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/storyAdmin.php3,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** storyAdmin.php3 2002/02/01 04:23:52 1.5 --- storyAdmin.php3 2002/02/03 22:09:12 1.6 *************** *** 13,19 **** *****************************/ ! $ary[author_id] = $author_id; ! $ary[topic_id] = $topic_id; ! $ary[section_id] = $section_id; slashhead($pagetitle,$xsiteobject); --- 13,19 ---- *****************************/ ! $ary['author_id'] = $author_id; ! $ary['topic_id'] = $topic_id; ! $ary['section_id'] = $section_id; slashhead($pagetitle,$xsiteobject); *************** *** 42,56 **** case "preview": ! $HTTP_POST_VARS[name] = $HTTP_POST_VARS[author_id]; $story->showStory($HTTP_POST_VARS); titlebar("100%", "Edit Story"); ! $HTTP_POST_VARS[title] = stripslashes($HTTP_POST_VARS[title]); ! $HTTP_POST_VARS[intro_text] = stripslashes($HTTP_POST_VARS[intro_text]); ! $HTTP_POST_VARS[body_text] = stripslashes($HTTP_POST_VARS[body_text]); $story->newStory($HTTP_POST_VARS, "array"); break; case "edit": ! $HTTP_POST_VARS[story_id] = $story_id; $story->newStory($HTTP_POST_VARS, "database"); break; --- 42,56 ---- case "preview": ! $HTTP_POST_VARS['name'] = $HTTP_POST_VARS['author_id']; $story->showStory($HTTP_POST_VARS); titlebar("100%", "Edit Story"); ! $HTTP_POST_VARS['title'] = stripslashes($HTTP_POST_VARS['title']); ! $HTTP_POST_VARS['intro_text'] = stripslashes($HTTP_POST_VARS['intro_text']); ! $HTTP_POST_VARS['body_text'] = stripslashes($HTTP_POST_VARS['body_text']); $story->newStory($HTTP_POST_VARS, "array"); break; case "edit": ! $HTTP_POST_VARS['story_id'] = $story_id; $story->newStory($HTTP_POST_VARS, "database"); break; *************** *** 70,74 **** slashfoot(); ! PAGE_close(); ?> --- 70,74 ---- slashfoot(); ! page_close(); ?> Index: submissionAdmin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/submissionAdmin.php3,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** submissionAdmin.php3 2002/02/01 04:23:52 1.5 --- submissionAdmin.php3 2002/02/03 22:09:12 1.6 *************** *** 67,71 **** # echo "<B>EDIT AS STORY</B><BR>\n"; $submission->editasStory($submission_id); ! if ($_PSL[submission_autodelete]) { $submission->deleteSubmission($submission_id); }; --- 67,71 ---- # echo "<B>EDIT AS STORY</B><BR>\n"; $submission->editasStory($submission_id); ! if ($_PSL['submission_autodelete']) { $submission->deleteSubmission($submission_id); }; *************** *** 76,80 **** $submission->displaySubmission($submission_id); titlebar("100%","Edit Submission"); ! $ary[submission_id] = $submission_id; $submission->newSubmission($ary,"database"); break; --- 76,80 ---- $submission->displaySubmission($submission_id); titlebar("100%","Edit Submission"); ! $ary['submission_id'] = $submission_id; $submission->newSubmission($ary,"database"); break; *************** *** 99,103 **** slashfoot(); ! PAGE_close(); ?> --- 99,103 ---- slashfoot(); ! page_close(); ?> |
From: nathan h. <nh...@us...> - 2002-02-03 22:09:14
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv15746 Modified Files: CHANGES Log Message: String fixin' contiunues Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.386 retrieving revision 1.387 diff -C2 -d -r1.386 -r1.387 *** CHANGES 2002/02/03 03:55:01 1.386 --- CHANGES 2002/02/03 22:09:11 1.387 *************** *** 13,16 **** --- 13,21 ---- 9 - Removal of something (kill -9 :) + 2002-Feb-03 5:00PM EST nathan hruby <na...@ds...> + [W] - String fixin' continues. All php files now should behave better, + this should be the last of them, but if you see an unquoted string, + please quote it. And please uses quotes in strings from now on! + 2002-Feb-02 10:00PM CST Joe Stewart <jo...@be...> [9] - removed indextpl3col.php3 which is not needed since Peter's |
From: Joe S. <joe...@us...> - 2002-02-03 03:55:04
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv23997 Modified Files: CHANGES Log Message: removed unused indextpl3col.php3 Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.385 retrieving revision 1.386 diff -C2 -d -r1.385 -r1.386 *** CHANGES 2002/02/03 02:49:39 1.385 --- CHANGES 2002/02/03 03:55:01 1.386 *************** *** 13,16 **** --- 13,20 ---- 9 - Removal of something (kill -9 :) + 2002-Feb-02 10:00PM CST Joe Stewart <jo...@be...> + [9] - removed indextpl3col.php3 which is not needed since Peter's + changes to index.php3. + 2002-Feb-02 9:35PM EST nathan hruby <na...@ds...> [W] - Went through all class files, functions.inc and config to |
From: Joe S. <joe...@us...> - 2002-02-03 03:52:13
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory usw-pr-cvs1:/tmp/cvs-serv23470 Removed Files: indextpl3col.php3 Log Message: removed - unused --- indextpl3col.php3 DELETED --- |
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv13222/class Modified Files: Author.class Block.class Block_i.class Block_render_cal.class Block_render_poll.class Block_render_query.class Block_render_quote.class Block_render_rss.class Block_render_section.class Block_render_skin.class Block_render_topic.class Comment.class Glossary.class Infolog.class MailingList.class NavBar.class Poll.class Section.class Story.class Story_base.class Submission.class Topic.class TopicBar.class functions.inc slashAuth.class slashAuthCR.class slashPerm.class Log Message: made class files and such use quoted strings in arrays Index: Author.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Author.class,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Author.class 2002/01/23 00:15:22 1.15 --- Author.class 2002/02/03 02:49:39 1.16 *************** *** 32,42 **** $this->author_templ->debug = 0; $this->author_templ->set_file(array( ! listauthor => "authorList.tpl", ! newauthor => "authorNew.tpl" )); $this->author_templ->set_var( array( ! ROOTDIR => $this->psl['rootur'], ! IMAGEDIR => $this->psl['imageurl'] )); } --- 32,42 ---- $this->author_templ->debug = 0; $this->author_templ->set_file(array( ! 'listauthor' => "authorList.tpl", ! 'newauthor' => "authorNew.tpl" )); $this->author_templ->set_var( array( ! 'ROOTDIR' => $this->psl['rootur'], ! 'IMAGEDIR' => $this->psl['imageurl'] )); } *************** *** 68,90 **** while ($this->db->next_record()) { ! $author_id = $this->db->Record[author_id]; $this->author_templ->set_var(array( ! ACTION_URL => $this->psl['phpself'], ! AUTHOR_ID => $author_id, ! NAME => $this->db->f("author_name"), ! REALNAME => $this->db->f("author_realname"), ! EMAIL => $this->db->f("email"), ! URL => $this->db->f("url"), ! QUOTE => $this->db->f("quote"), ! PASSWORD => $this->db->f("password"), ! COUNT => $count, ! AMP => $this->psl['amp'] )); $this->author_templ->parse("rows","row",true); $count++; }; ! $this->author_templ->parse(OUT,array("listauthor")); ! $this->author_templ->p(OUT); } --- 68,90 ---- while ($this->db->next_record()) { ! $author_id = $this->db->Record['author_id']; $this->author_templ->set_var(array( ! 'ACTION_URL' => $this->psl['phpself'], ! 'AUTHOR_ID' => $author_id, ! 'NAME' => $this->db->f("author_name"), ! 'REALNAME' => $this->db->f("author_realname"), ! 'EMAIL' => $this->db->f("email"), ! 'URL' => $this->db->f("url"), ! 'QUOTE' => $this->db->f("quote"), ! 'PASSWORD' => $this->db->f("password"), ! 'COUNT' => $count, ! 'AMP' => $this->psl['amp'] )); $this->author_templ->parse("rows","row",true); $count++; }; ! $this->author_templ->parse('OUT',array("listauthor")); ! $this->author_templ->p('OUT'); } *************** *** 105,113 **** function saveAuthor($ary) { ! if ($ary[author_name] == "") { error("There is no author_name in Author.class::saveAuthor"); return false; } ! if (!is_array($ary[permission]) or (count($ary[permission]) < 1)) { error("You need to select some permissions in Author.class::saveAuthor"); return false; --- 105,113 ---- function saveAuthor($ary) { ! if ($ary['author_name'] == "") { error("There is no author_name in Author.class::saveAuthor"); return false; } ! if (!is_array($ary['permission']) or (count($ary['permission']) < 1)) { error("You need to select some permissions in Author.class::saveAuthor"); return false; *************** *** 117,134 **** $ary["quote"] = clean($ary["quote"]); ! $ary[author_name] = addslashes(str_replace('\"',""",stripslashes($ary["author_name"]))); ! // $ary[author_name] = str_replace(" "," ",stripslashes($ary["author_name"])); ! $ary[author_realname] = addslashes(str_replace('\"',""",stripslashes( ! $ary["author_realname"]))); /* if a record exists, then we update, else we insert a new author! */ $this->db->query("SELECT author_id ! FROM psl_author ! WHERE author_id = '$ary[author_id]'"); ! $joined_perms = join(',',$ary[permission]); if ($this->db->next_record()) { ! if ($ary[password] == "") { $q = "UPDATE psl_author SET author_name = '$ary[author_name]', --- 117,133 ---- $ary["quote"] = clean($ary["quote"]); ! $ary['author_name'] = addslashes(str_replace('\"',""",stripslashes($ary["author_name"]))); ! // $ary['author_name'] = str_replace(" "," ",stripslashes($ary["author_name"])); ! $ary['author_realname'] = addslashes(str_replace('\"',""",stripslashes($ary["author_realname"]))); /* if a record exists, then we update, else we insert a new author! */ $this->db->query("SELECT author_id ! FROM psl_author ! WHERE author_id = '".$ary['author_id']."'"); ! $joined_perms = join(',',$ary['permission']); if ($this->db->next_record()) { ! if ($ary['password'] == "") { $q = "UPDATE psl_author SET author_name = '$ary[author_name]', *************** *** 152,161 **** } else { ! if ($ary[password] == "") { error("There is no password in Author.class::saveAuthor"); return false; } ! $ary[author_id] = generateID("psl_author_seq"); $q = "INSERT INTO psl_author --- 151,160 ---- } else { ! if ($ary['password'] == "") { error("There is no password in Author.class::saveAuthor"); return false; } ! $ary['author_id'] = generateID("psl_author_seq"); $q = "INSERT INTO psl_author *************** *** 264,280 **** $this->author_templ->set_var(array( ! ACTION_URL => $this->psl['phpself'], ! AUTHOR_ID => "", ! NAME => "", ! REALNAME => $this->author_id, ! EMAIL => "", ! URL => "", ! QUOTE => "", ! PASSWORD => "", ! SECLEV => "" )); ! $this->author_templ->parse(OUT,array("newauthor")); ! $this->author_templ->p(OUT); } --- 263,279 ---- $this->author_templ->set_var(array( ! 'ACTION_URL' => $this->psl['phpself'], ! 'AUTHOR_ID' => "", ! 'NAME' => "", ! 'REALNAME' => $this->author_id, ! 'EMAIL' => "", ! 'URL' => "", ! 'QUOTE' => "", ! 'PASSWORD' => "", ! 'SECLEV' => "" )); ! $this->author_templ->parse('OUT',array("newauthor")); ! $this->author_templ->p('OUT'); } *************** *** 303,308 **** while ($this->db->next_record()) { ! $author_id = $this->db->Record[author_id]; ! $author_perms = $this->db->Record[perms]; $this->author_templ->set_block("newauthor","perm_row","perm_rows"); $this->author_templ->set_block("newauthor","permhave_row","permhave_rows"); --- 302,307 ---- while ($this->db->next_record()) { ! $author_id = $this->db->Record['author_id']; ! $author_perms = $this->db->Record['perms']; $this->author_templ->set_block("newauthor","perm_row","perm_rows"); $this->author_templ->set_block("newauthor","permhave_row","permhave_rows"); *************** *** 319,338 **** $this->author_templ->set_var(array( ! ACTION_URL => $this->psl['phpself'], ! AUTHOR_ID => $author_id, ! NAME => $this->db->f("author_name"), ! REALNAME => $this->db->f("author_realname"), ! EMAIL => $this->db->f("email"), ! URL => $this->db->f("url"), ! QUOTE => $this->db->f("quote"), ! // PASSWORD => $this->db->f("password"), ! SECLEV => $this->db->f("seclev"), ! COUNT => $count, ! AMP => $this->psl['amp'] )); }; ! $this->author_templ->parse(OUT,array("newauthor")); ! $this->author_templ->p(OUT); } --- 318,337 ---- $this->author_templ->set_var(array( ! 'ACTION_URL' => $this->psl['phpself'], ! 'AUTHOR_ID' => $author_id, ! 'NAME' => $this->db->f("author_name"), ! 'REALNAME' => $this->db->f("author_realname"), ! 'EMAIL' => $this->db->f("email"), ! 'URL' => $this->db->f("url"), ! 'QUOTE' => $this->db->f("quote"), ! // 'PASSWORD' => $this->db->f("password"), ! 'SECLEV' => $this->db->f("seclev"), ! 'COUNT' => $count, ! 'AMP' => $this->psl['amp'] )); }; ! $this->author_templ->parse('OUT',array("newauthor")); ! $this->author_templ->p('OUT'); } Index: Block.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block.class,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Block.class 2002/02/01 21:38:55 1.9 --- Block.class 2002/02/03 02:49:39 1.10 *************** *** 1,3 **** ! <?php /* @version $Id$ */ --- 1,3 ---- ! '<?php /* @version $Id$ */ *************** *** 358,362 **** $this->getBlock($id); } ! if ( ($this->block_info[block_options][column] == $column) OR ($column == "")) { --- 358,362 ---- $this->getBlock($id); } ! if ( ($this->block_info['block_options']['column'] == $column) OR ($column == "")) { *************** *** 386,390 **** $link = ""; } ! if (is_array($this->block_info[block_options])) { if (is_string($this->block_info["block_options"]["width"])) { $width = $this->block_info["block_options"]["width"]; --- 386,390 ---- $link = ""; } ! if (is_array($this->block_info["block_options"])) { if (is_string($this->block_info["block_options"]["width"])) { $width = $this->block_info["block_options"]["width"]; *************** *** 448,452 **** return true; } else { ! $this->block_info["cache_data"] = "type = $this->block_info[type]<br>"; return false; } --- 448,452 ---- return true; } else { ! $this->block_info["cache_data"] = "type = ".$this->block_info['type']."<br>"; return false; } *************** *** 560,564 **** $this->block_ary[$i] = $db->Record; ! $this->block_ary[$i][block_options] = unserialize($db->Record["block_options"]); $last = intval($this->block_ary[$i]["last_update"]); --- 560,564 ---- $this->block_ary[$i] = $db->Record; ! $this->block_ary[$i]['block_options'] = unserialize($db->Record["block_options"]); $last = intval($this->block_ary[$i]["last_update"]); *************** *** 573,577 **** if ($this->doParse('1')) { ! $this->block_ary[$i][cache_data] = $this->block_info["cache_data"]; } } --- 573,577 ---- if ($this->doParse('1')) { ! $this->block_ary[$i]['cache_data'] = $this->block_info["cache_data"]; } } Index: Block_i.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_i.class,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Block_i.class 2002/02/01 21:38:56 1.13 --- Block_i.class 2002/02/03 02:49:39 1.14 *************** *** 5,9 **** /* First let's bring in my parent class */ ! require($_PSL[classdir] . '/Block.class'); /** --- 5,9 ---- /* First let's bring in my parent class */ ! require($_PSL['classdir'] . '/Block.class'); /** *************** *** 48,60 **** /* Setup the files array */ $this->templ->set_file(array( ! listblock => "blockList.tpl", ! newblock => "blockEdit.tpl", ! editblock => "blockEdit.tpl" )); /* Setup the template vars. We need these in all our templates */ $this->templ->set_var( array( ! ROOTDIR => $this->psl[rooturl], ! IMAGEDIR => $this->psl[imageurl] )); } --- 48,60 ---- /* Setup the files array */ $this->templ->set_file(array( ! 'listblock' => "blockList.tpl", ! 'newblock' => "blockEdit.tpl", ! 'editblock' => "blockEdit.tpl" )); /* Setup the template vars. We need these in all our templates */ $this->templ->set_var( array( ! 'ROOTDIR' => $this->psl['rooturl'], ! 'IMAGEDIR' => $this->psl['imageurl'] )); } *************** *** 76,82 **** while ( list( $key, $val ) = each( $ary ) ) { $this->templ->set_var(array( ! BLOCK_TYPE_ID => $key, ! SELECTED => "", ! BLOCK_TYPE_NAME => $val )); $this->templ->parse("block_type_rows","block_type_row",true); --- 76,82 ---- while ( list( $key, $val ) = each( $ary ) ) { $this->templ->set_var(array( ! 'BLOCK_TYPE_ID' => $key, ! 'SELECTED' => "", ! 'BLOCK_TYPE_NAME' => $val )); $this->templ->parse("block_type_rows","block_type_row",true); *************** *** 90,96 **** while ($this->db->next_record()) { $this->templ->set_var(array( ! SECTION_ID => $this->db->Record[section_id], ! SELECTED => "", ! SECTION_NAME => $this->db->Record[section_name] )); $this->templ->parse("section_rows","section_row",true); --- 90,96 ---- while ($this->db->next_record()) { $this->templ->set_var(array( ! 'SECTION_ID' => $this->db->Record[section_id], ! 'SELECTED' => "", ! 'SECTION_NAME' => $this->db->Record[section_name] )); $this->templ->parse("section_rows","section_row",true); *************** *** 100,107 **** for ($i =1; $i <= $blockcnt; $i++) { $this->templ->set_var(array( ! OPTION_NAME => "optionname[$i]", ! OPTION_NAME_VAL => "", ! OPTION_VALUE => "optionval[$i]", ! OPTION_VALUE_VAL => "" )); $this->templ->parse("options", "each_option", true); --- 100,107 ---- for ($i =1; $i <= $blockcnt; $i++) { $this->templ->set_var(array( ! 'OPTION_NAME' => "optionname[$i]", ! 'OPTION_NAME_VAL' => "", ! 'OPTION_VALUE' => "optionval[$i]", ! 'OPTION_VALUE_VAL' => "" )); $this->templ->parse("options", "each_option", true); *************** *** 110,125 **** /* display a blank form */ $this->templ->set_var(array( ! ACTION_URL => $this->psl['phpself'], ! BLOCK_TITLE => "", ! LOCATION => "", ! SOURCE_URL => "", ! EXPIRE_LENGTH => "", ! CACHE_DATA => "", ! BLOCK_ID => "", ! ORDERNUM => "" )); ! $this->templ->parse(OUT,array("newblock")); ! $this->templ->p(OUT); } --- 110,125 ---- /* display a blank form */ $this->templ->set_var(array( ! 'ACTION_URL' => $this->psl['phpself'], ! 'BLOCK_TITLE' => "", ! 'LOCATION' => "", ! 'SOURCE_URL' => "", ! 'EXPIRE_LENGTH' => "", ! 'CACHE_DATA' => "", ! 'BLOCK_ID' => "", ! 'ORDERNUM' => "" )); ! $this->templ->parse('OUT',array("newblock")); ! $this->templ->p('OUT'); } *************** *** 160,170 **** while ( list( $key, $val ) = each( $ary ) ) { $this->templ->set_var(array( ! BLOCK_TYPE_ID => $key, ! SELECTED => "", ! BLOCK_TYPE_NAME => $val )); if ($key == $this->block_info["type_id"]) { $this->templ->set_var(array( ! SELECTED => "SELECTED" )); } --- 160,170 ---- while ( list( $key, $val ) = each( $ary ) ) { $this->templ->set_var(array( ! 'BLOCK_TYPE_ID' => $key, ! 'SELECTED' => "", ! 'BLOCK_TYPE_NAME' => $val )); if ($key == $this->block_info["type_id"]) { $this->templ->set_var(array( ! 'SELECTED' => "SELECTED" )); } *************** *** 178,183 **** while ($this->db->next_record()) { $this->templ->set_var(array( ! SECTION_ID => $this->db->Record[section_id], ! SECTION_NAME => $this->db->Record[section_name] )); --- 178,183 ---- while ($this->db->next_record()) { $this->templ->set_var(array( ! 'SECTION_ID' => $this->db->Record['section_id'], ! 'SECTION_NAME' => $this->db->Record['section_name'] )); *************** *** 195,199 **** reset($temparray); } ! $blockcnt = $this->psl[block_optioncount]; $i = 1; --- 195,199 ---- reset($temparray); } ! $blockcnt = $this->psl['block_optioncount']; $i = 1; *************** *** 203,210 **** if ($current) { $this->templ->set_var(array( ! OPTION_NAME => "optionname[$i]", ! OPTION_NAME_VAL => $current[0], ! OPTION_VALUE => "optionval[$i]", ! OPTION_VALUE_VAL => $current[1] )); } --- 203,210 ---- if ($current) { $this->templ->set_var(array( ! 'OPTION_NAME' => "optionname[$i]", ! 'OPTION_NAME_VAL' => $current[0], ! 'OPTION_VALUE' => "optionval[$i]", ! 'OPTION_VALUE_VAL' => $current[1] )); } *************** *** 218,225 **** while ($i <= $blockcnt) { $this->templ->set_var(array( ! OPTION_NAME => "optionname[$i]", ! OPTION_NAME_VAL => "", ! OPTION_VALUE => "optionval[$i]", ! OPTION_VALUE_VAL => "" )); $this->templ->parse("options", "each_option", true); --- 218,225 ---- while ($i <= $blockcnt) { $this->templ->set_var(array( ! 'OPTION_NAME' => "optionname[$i]", ! 'OPTION_NAME_VAL' => "", ! 'OPTION_VALUE' => "optionval[$i]", ! 'OPTION_VALUE_VAL' => "" )); $this->templ->parse("options", "each_option", true); *************** *** 228,244 **** $this->templ->set_var(array( ! ACTION_URL => $this->psl['phpself'], ! BLOCK_TITLE => $this->block_info["title"], ! LOCATION => $this->block_info["location"], ! SOURCE_URL => $this->block_info["source_url"], ! EXPIRE_LENGTH => $this->block_info["expire_length"], ! CACHE_DATA => $this->block_info["cache_data"], ! ORDERNUM => $this->block_info["ordernum"], ! BLOCK_ID => $id )); ! $this->templ->parse(OUT,array("editblock")); ! $this->templ->p(OUT); ! $this->templ->set_var(OUT,""); } --- 228,244 ---- $this->templ->set_var(array( ! 'ACTION_URL' => $this->psl['phpself'], ! 'BLOCK_TITLE' => $this->block_info["title"], ! 'LOCATION' => $this->block_info["location"], ! 'SOURCE_URL' => $this->block_info["source_url"], ! 'EXPIRE_LENGTH' => $this->block_info["expire_length"], ! 'CACHE_DATA' => $this->block_info["cache_data"], ! 'ORDERNUM' => $this->block_info["ordernum"], ! 'BLOCK_ID' => $id )); ! $this->templ->parse('OUT',array("editblock")); ! $this->templ->p('OUT'); ! $this->templ->set_var('OUT',""); } *************** *** 274,284 **** $this->templ->set_var(array( ! MODIFYURL => $modifyurl, ! DELURL => $delurl, ! VIEWURL => $viewurl, ! TITLE => $this->db->f("title"), ! URL => $this->db->f("location"), ! SOURCE_URL=> $this->db->f("source_url"), ! TYPE => $this->db->f("type") )); $this->templ->parse("rows","row","true"); --- 274,284 ---- $this->templ->set_var(array( ! 'MODIFYURL' => $modifyurl, ! 'DELURL' => $delurl, ! 'VIEWURL' => $viewurl, ! 'TITLE' => $this->db->f("title"), ! 'URL' => $this->db->f("location"), ! 'SOURCE_URL' => $this->db->f("source_url"), ! 'TYPE' => $this->db->f("type") )); $this->templ->parse("rows","row","true"); *************** *** 287,292 **** titlebar("100%", "Update the Current Blocks"); ! $this->templ->parse(OUT, array("listblock")); ! $this->templ->p(OUT); } --- 287,292 ---- titlebar("100%", "Update the Current Blocks"); ! $this->templ->parse('OUT', array("listblock")); ! $this->templ->p('OUT'); } *************** *** 303,307 **** */ function getAllBlocksForIndex($section, $column="") { ! $ary[section] = $section; return $this->getBlocks($ary, $column); } --- 303,307 ---- */ function getAllBlocksForIndex($section, $column="") { ! $ary['section'] = $section; return $this->getBlocks($ary, $column); } *************** *** 312,317 **** * @param array ary * ! * ary[section] = return html formatted blocks assigned to this section ! * ary[section_id] = return html formatted blocks assigned to this section_id * * @param string column --- 312,317 ---- * @param array ary * ! * ary['section'] = return html formatted blocks assigned to this section ! * ary['section_id'] = return html formatted blocks assigned to this section_id * * @param string column *************** *** 359,363 **** $width = "100%"; ! if ( ($ary[block_options][column] == $column) OR ($column == "")) { --- 359,363 ---- $width = "100%"; ! if ( ($ary['block_options']['column'] == $column) OR ($column == "")) { *************** *** 376,380 **** $link = ""; } ! if (is_array($ary[block_options])) { if (is_string($ary["block_options"]["width"])) { $width = $ary["block_options"]["width"]; --- 376,380 ---- $link = ""; } ! if (is_array($ary['block_options'])) { if (is_string($ary["block_options"]["width"])) { $width = $ary["block_options"]["width"]; *************** *** 401,405 **** function listBlockTypes($option="", $name="") { ! $this->templ = new Template($this->psl[templatedir]); $this->templ->debug = 0; $this->templ->set_file(array( --- 401,405 ---- function listBlockTypes($option="", $name="") { ! $this->templ = new Template($this->psl['templatedir']); $this->templ->debug = 0; $this->templ->set_file(array( *************** *** 411,418 **** if( $option == "all") { ! $fulldirlist = dir($this->psl[classdir]); $i=1; while( $eachfile = $fulldirlist->read()) { ! $each = $this->psl[classdir] . "/" . $eachfile; if( (is_file($each)) AND ( $each != ".") AND --- 411,418 ---- if( $option == "all") { ! $fulldirlist = dir($this->psl['classdir']); $i=1; while( $eachfile = $fulldirlist->read()) { ! $each = $this->psl['classdir'] . "/" . $eachfile; if( (is_file($each)) AND ( $each != ".") AND *************** *** 436,440 **** $this->templ->set_var(array( REMOVENAME => $current_type, ! REMOVEURL => $this->psl[phpself] ."?option=delete". $this->psl[amp] ."name=". $current_type )); --- 436,440 ---- $this->templ->set_var(array( REMOVENAME => $current_type, ! REMOVEURL => $this->psl['phpself'] ."?option=delete". $this->psl['amp'] ."name=". $current_type )); *************** *** 450,455 **** $this->templ->set_var(array( ! ADDNAME => $key, ! ADDURL => $this->psl[phpself] ."?option=add". $this->psl[amp] ."name=". $key )); $this->templ->parse("rows","addrow",true); --- 450,455 ---- $this->templ->set_var(array( ! 'ADDNAME' => $key, ! 'ADDURL' => $this->psl[phpself] ."?option=add". $this->psl[amp] ."name=". $key )); $this->templ->parse("rows","addrow",true); *************** *** 457,462 **** } ! $this->templ->parse(OUT,array("listblocktypes")); ! $this->templ->p(OUT); } elseif ($option == "add") { $this->putType($name); --- 457,462 ---- } ! $this->templ->parse('OUT',array("listblocktypes")); ! $this->templ->p('OUT'); } elseif ($option == "add") { $this->putType($name); *************** *** 466,470 **** $this->listBlockTypes("all"); } else { ! echo "<A HREF=" . $this->psl[phpself] . "?submit=display" . $this->psl[amp] . "option=all>[Add or Remove Block Types]</A>"; } } --- 466,470 ---- $this->listBlockTypes("all"); } else { ! echo "<A HREF=" . $this->psl['phpself'] . "?submit=display" . $this->psl['amp'] . "option=all>[Add or Remove Block Types]</A>"; } } Index: Block_render_cal.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_render_cal.class,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Block_render_cal.class 2001/08/06 13:22:31 1.2 --- Block_render_cal.class 2002/02/03 02:49:39 1.3 *************** *** 21,30 **** function parse($block_info) { ! global $templatedir; $templ = new Template($templatedir); $templ->set_file(array( ! calendar => "calendar.tpl" )); $templ->debug=0; --- 21,30 ---- function parse($block_info) { ! // TODO: Make this class use $_PSL global $templatedir; $templ = new Template($templatedir); $templ->set_file(array( ! 'calendar' => "calendar.tpl" )); $templ->debug=0; *************** *** 89,94 **** } $templ->set_var(array( ! URL => "$PHP_SELF?date=$url_date" . $url_day, ! LINKED_DATA => "$daycounter" )); $linkon = 1; --- 89,94 ---- } $templ->set_var(array( ! 'URL' => "$PHP_SELF?date=$url_date" . $url_day, ! 'LINKED_DATA' => "$daycounter" )); $linkon = 1; *************** *** 112,117 **** } ! $templ->parse(OUT,array("calendar")); ! $this->output = $templ->get(OUT); } --- 112,117 ---- } ! $templ->parse('OUT',array("calendar")); ! $this->output = $templ->get('OUT'); } *************** *** 124,129 **** $current_date=getdate(); ! $month=$current_date[ "mon"]; ! $day=$current_date[ "mday"]; $this->title=pslgetText($montharray[$month]) . " " . $day; --- 124,129 ---- $current_date=getdate(); ! $month=$current_date["mon"]; ! $day=$current_date["mday"]; $this->title=pslgetText($montharray[$month]) . " " . $day; Index: Block_render_poll.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_render_poll.class,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Block_render_poll.class 2001/05/15 22:36:15 1.1 --- Block_render_poll.class 2002/02/03 02:49:39 1.2 *************** *** 28,32 **** $question_id = ""; ! if (is_array($block_info[block_options])) { if (is_string($block_info["block_options"]["question_id"])) { $question_id = $block_info["block_options"]["question_id"]; --- 28,32 ---- $question_id = ""; ! if (is_array($block_info["block_options"])) { if (is_string($block_info["block_options"]["question_id"])) { $question_id = $block_info["block_options"]["question_id"]; Index: Block_render_query.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_render_query.class,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Block_render_query.class 2001/11/12 02:34:11 1.4 --- Block_render_query.class 2002/02/03 02:49:39 1.5 *************** *** 1,145 **** ! <?php ! ! /* Block_render_query.class -> Methods for phpslash specfic blocks */ ! /* Id:$ */ ! ! /* pass the query in the "Source Url" form field in the format of: ! * ! * option1=setting1&option2=setting2 ! * ! * Available query options: ! * ! * section = section name ! * topic = topic name ! * author = author name ! * date = starting date in "to_days" format ! * start = "starting" point [0] ! * max = maximum returned [10] ! * order = [time], hits, title, etc. ! * asc = ASC, [DESC] ( Ascending or Descending) ! * query = urlencoded text string ! * tpl = template filename (no path or extension) ! * ! */ ! ! class Block_render_query { ! ! var $type; ! var $output; ! var $psl; ! ! /* constructor */ ! function Block_render_query() { ! ! global $_PSL; ! ! $this->type = "query"; /* set the 'type' */ ! $this->output = ""; /* clear the output */ ! $this->psl = $_PSL; ! ! } ! ! /* returns the TYPE of this class */ ! function getType() { ! return $this->type; ! } ! ! function parse( $block_info) { ! ! $this->output = $this->query( $block_info); ! return 1; ! } ! ! function query( $block_info) { ! ! $stories = new Story_base; ! ! $amp = $this->psl['amp']; ! $site_homesection = $this->psl['site_homesection']; ! ! $default_tpl = "queryblock.tpl"; ! ! $options_ary = split( "&",$block_info["source_url"] ); ! for( $i=0 ; $i < count($options_ary) ; $i++) { ! $arg_ary = split( "=", $options_ary[$i]); ! $ary[$arg_ary[0]] = urldecode($arg_ary[1]); ! } ! ! $ary[tpl] = ""; // disable template option ! if( empty($ary[tpl]) ) { ! $tpl = $default_tpl; ! } elseif ( file_exists($this->psl[templatedir] . "/" . basename($ary[tpl]) . ".tpl") ) { ! # should be secure as path directives are discarded and extension added ! $tpl = basename($ary[tpl]) . ".tpl"; ! } else { ! debug ( "Block_render_query:Template file doesn't exist, using default instead", $tpl); ! $tpl = $default_tpl; ! } ! ! $template = new Template($this->psl["templatedir"]); ! $template->debug = 0; ! $template->set_file(array( ! block => "$tpl" ! )); ! $template->set_block ("block", "each_query", "query_block"); ! ! $stories_ary = $stories->extractStories( $ary); ! ! if (is_array($stories_ary)) { ! for ($i = 0 ; $i < count($stories_ary) ; $i++) { ! ! $story_id = $stories_ary[$i][story_id]; ! if ($ary['section_id'] != "") { ! $story_id .= $amp . "section_id=" . $ary['section_id']; ! } elseif ( ($ary['section'] != "") AND ( $ary['section'] != $site_homesection)) { ! $section = new Section; ! $section_name = $section->getId($ary['section']); ! $story_id .= $amp . "section=" . $section_name; ! } ! if ($topic_id != "") { ! $story_id .= $amp . "topic_id=" . $ary['topic_id']; ! } elseif ($ary['topic'] != "") { ! $topic = new Topic; ! $topic_name = $topic->getId($ary['topic']); ! $story_id .= $amp . "topic=" . $topic_name; ! } ! ! $template->set_var(array( ! STORY_ID => $story_id, ! TITLE => $stories_ary[$i][title], ! INTRO_TEXT => $stories_ary[$i][intro_text], ! BODY_TEXT => $body_text, ! DEPT => $stories_ary[$i][dept], ! URL => $stories_ary[$i][url], ! NAME => $stories_ary[$i][name], ! DATEF => $stories_ary[$i][datef], ! HITS => $stories_ary[$i][hits], ! TOPIC_ID => $stories_ary[$i][topic_id], ! TOPIC_NAME => $stories_ary[$i][topic_name], ! TOPICIMAGE => $stories_ary[$i][image], ! TOPICWIDTH => $stories_ary[$i][width], ! TOPICHEIGHT => $stories_ary[$i][height], ! ALTTEXT => $stories_ary[$i][alt_text] ! )); ! ! $template->parse ("query_block", "each_query", true); ! } ! ! } ! ! $template->set_var(array( ! ROOTDIR => $this->psl[rooturl], ! IMAGEDIR => $this->psl[imageurl] ! )); ! ! return $template->parse(OUT,"block"); ! ! } ! ! function getFinal() { ! return $this->output; ! } ! ! } ! ! ?> --- 1,145 ---- ! <?php ! ! /* Block_render_query.class -> Methods for phpslash specfic blocks */ ! /* Id:$ */ ! ! /* pass the query in the "Source Url" form field in the format of: ! * ! * option1=setting1&option2=setting2 ! * ! * Available query options: ! * ! * section = section name ! * topic = topic name ! * author = author name ! * date = starting date in "to_days" format ! * start = "starting" point [0] ! * max = maximum returned [10] ! * order = [time], hits, title, etc. ! * asc = ASC, [DESC] ( Ascending or Descending) ! * query = urlencoded text string ! * tpl = template filename (no path or extension) ! * ! */ ! ! class Block_render_query { ! ! var $type; ! var $output; ! var $psl; ! ! /* constructor */ ! function Block_render_query() { ! ! global $_PSL; ! ! $this->type = "query"; /* set the 'type' */ ! $this->output = ""; /* clear the output */ ! $this->psl = $_PSL; ! ! } ! ! /* returns the TYPE of this class */ ! function getType() { ! return $this->type; ! } ! ! function parse( $block_info) { ! ! $this->output = $this->query( $block_info); ! return 1; ! } ! ! function query( $block_info) { ! ! $stories = new Story_base; ! ! $amp = $this->psl['amp']; ! $site_homesection = $this->psl['site_homesection']; ! ! $default_tpl = "queryblock.tpl"; ! ! $options_ary = split( "&",$block_info["source_url"] ); ! for( $i=0 ; $i < count($options_ary) ; $i++) { ! $arg_ary = split( "=", $options_ary[$i]); ! $ary[$arg_ary[0]] = urldecode($arg_ary[1]); ! } ! ! $ary[tpl] = ""; // disable template option ! if( empty($ary['tpl']) ) { ! $tpl = $default_tpl; ! } elseif ( file_exists($this->psl[templatedir] . "/" . basename($ary['tpl']) . ".tpl") ) { ! # should be secure as path directives are discarded and extension added ! $tpl = basename($ary['tpl']) . ".tpl"; ! } else { ! debug ( "Block_render_query:Template file doesn't exist, using default instead", $tpl); ! $tpl = $default_tpl; ! } ! ! $template = new Template($this->psl["templatedir"]); ! $template->debug = 0; ! $template->set_file(array( ! block => "$tpl" ! )); ! $template->set_block ("block", "each_query", "query_block"); ! ! $stories_ary = $stories->extractStories( $ary); ! ! if (is_array($stories_ary)) { ! for ($i = 0 ; $i < count($stories_ary) ; $i++) { ! ! $story_id = $stories_ary[$i][story_id]; ! if ($ary['section_id'] != "") { ! $story_id .= $amp . "section_id=" . $ary['section_id']; ! } elseif ( ($ary['section'] != "") AND ( $ary['section'] != $site_homesection)) { ! $section = new Section; ! $section_name = $section->getId($ary['section']); ! $story_id .= $amp . "section=" . $section_name; ! } ! if ($topic_id != "") { ! $story_id .= $amp . "topic_id=" . $ary['topic_id']; ! } elseif ($ary['topic'] != "") { ! $topic = new Topic; ! $topic_name = $topic->getId($ary['topic']); ! $story_id .= $amp . "topic=" . $topic_name; ! } ! ! $template->set_var(array( ! 'STORY_ID' => $story_id, ! 'TITLE' => $stories_ary[$i]['title'], ! 'INTRO_TEXT' => $stories_ary[$i]['intro_text'], ! 'BODY_TEXT' => $body_text, ! 'DEPT' => $stories_ary[$i]['dept'], ! 'URL' => $stories_ary[$i]['url'], ! 'NAME' => $stories_ary[$i]['name'], ! 'DATEF' => $stories_ary[$i]['datef'], ! 'HITS' => $stories_ary[$i]['hits'], ! 'TOPIC_ID' => $stories_ary[$i]['topic_id'], ! 'TOPIC_NAME' => $stories_ary[$i]['topic_name'], ! 'TOPICIMAGE' => $stories_ary[$i]['image'], ! 'TOPICWIDTH' => $stories_ary[$i]['width'], ! 'TOPICHEIGHT' => $stories_ary[$i]['height'], ! 'ALTTEXT' => $stories_ary[$i]['alt_text'] ! )); ! ! $template->parse ("query_block", "each_query", true); ! } ! ! } ! ! $template->set_var(array( ! 'ROOTDIR' => $this->psl['rooturl'], ! 'IMAGEDIR' => $this->psl['imageurl'] ! )); ! ! return $template->parse('OUT',"block"); ! ! } ! ! function getFinal() { ! return $this->output; ! } ! ! } ! ! ?> Index: Block_render_quote.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_render_quote.class,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Block_render_quote.class 2001/10/09 23:21:45 1.2 --- Block_render_quote.class 2002/02/03 02:49:39 1.3 *************** *** 44,50 **** if( empty($ary[tpl]) ) { $tpl = $default_tpl; ! } elseif ( file_exists($this->[templatedir] . "/" . basename($ary[tpl]) . ".tpl") ) { # should be secure as path directives are discarded and extension added ! $tpl = basename($ary[tpl]) . ".tpl"; } else { debug ( "Block_render_quote:Template file doesn't exist, using default instead", $tpl); --- 44,50 ---- if( empty($ary[tpl]) ) { $tpl = $default_tpl; ! } elseif ( file_exists($this->['templatedir'] . "/" . basename($ary['tpl']) . ".tpl") ) { # should be secure as path directives are discarded and extension added ! $tpl = basename($ary['tpl']) . ".tpl"; } else { debug ( "Block_render_quote:Template file doesn't exist, using default instead", $tpl); *************** *** 75,83 **** $template->set_var(array( ! QUOTE => $db->f("quote"), ! AUTHOR => $db->f("author") )); ! return $template->parse(OUT,"block"); } --- 75,83 ---- $template->set_var(array( ! 'QUOTE' => $db->f("quote"), ! 'AUTHOR' => $db->f("author") )); ! return $template->parse('OUT',"block"); } Index: Block_render_rss.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_render_rss.class,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Block_render_rss.class 2002/01/23 20:17:46 1.3 --- Block_render_rss.class 2002/02/03 02:49:39 1.4 *************** *** 1,327 **** ! <?php ! ! /* Block_render_rss.class -> Methods for parsing RSS 0.91 data */ ! /* CHANGES: 4Jan02 - RSS title stored */ ! /* $Id$ */ ! /* ! * VARAIBLES USED ! * target = [_blank],_self etc ! * max = 10 ! * tpl = alternate template ( no .tpl extension) [rssblock.tpl] ! * ! * NOTES ! * - image width and height are not used since most sites seem not to give this info anyway ! * - rdfparser ignores max_items - it pulls everything it can from the RDF file ! */ ! class rdfparser { ! ! // Settings ! var $max_items; ! var $tags; // tags to process (all others are ignored) ! ! // Output information ! var $channel; ! var $image; ! var $items; ! ! var $error_str = ""; /* if you got an error reading a file this will store an error */ ! ! // Private ! var $xml; ! var $node; ! var $current; ! var $count; ! ! /*************************************** ! ** Constructor function. See parse_setup ! ***************************************/ ! function rdfparser() { ! } ! ! /*************************************** ! ** Start element function. ! ***************************************/ ! function start_element($xml, $element, $attributes) { ! ! $this->current = $element; ! ! switch ($element) { ! case $this->tags["item"]: ! case $this->tags["image"]: ! case $this->tags["channel"]: ! $this->node = $element; // Should be a stack really, but nesting is only one deep ! // debug("rdf:start element+node","$element+".$this->node); ! break; ! ! default: ! } ! ! } ! ! /*************************************** ! ** End element function. ! ***************************************/ ! function end_element($xml, $element) { ! $this->current = ""; ! ! switch ($element) { ! case $this->tags["item"]: ! $this->node = ""; ! $this->count++; ! break; ! case $this->tags["channel"]: ! case $this->tags["image"]: ! $this->node = ""; ! break; ! } ! } ! ! function character_data($xml, $data) { ! ! switch ($this->node) { ! ! case $this->tags["item"]: ! switch ($this->current) { ! case $this->tags["title"]: ! $this->items[$this->count]["title"] .= $data; ! break; ! case $this->tags["link"]: ! $this->items[$this->count]["link"] .= $data; ! break; ! case $this->tags["description"]: ! $this->items[$this->count]["description"] .= $data; ! break; ! default: ! } ! break; ! ! case $this->tags["image"]: ! switch ($this->current) { ! case $this->tags["title"]: ! $this->image["title"] .= $data; ! break; ! case $this->tags["link"]: ! $this->image["link"] .= $data; ! break; ! case $this->tags["url"]: ! $this->image["url"] .= $data; ! break; ! default: ! } ! break; ! ! case $this->tags["channel"]: ! switch ($this->current) { ! case $this->tags["title"]: ! $this->channel["title"] .= $data; ! break; ! case $this->tags["link"]: ! $this->channel["link"] .= $data; ! break; ! case $this->tags["description"]: ! $this->channel["description"] .= $data; ! break; ! default: ! } ! break; ! ! default: ! } ! } ! ! function parse_setup($tags="",$max_items="") { ! ! if (is_array($tags)) { ! $this->tags = $tags; ! } else { ! // standard rdf setup - must be upper case (assuming case-folding is on which is PHP's default) ! $this->tags = array("channel" => "CHANNEL", ! "image" => "IMAGE", ! "item" => "ITEM", ! "title" => "TITLE", ! "link" => "LINK", ! "url" => "URL", ! "description" => "DESCRIPTION" ); ! } ! ! // Internal initialisation ! $this->count = 0; ! $this->node = ""; // can be "" (ie channel), "item" or "image" ! $this->current = array(); // element stack ! ! $this->error_str = ""; ! ! $this->channel = array("title"=>"", "link"=>"", "description" => ""); ! $this->image = array("title"=>"", "link"=>""); ! $this->items = array(); ! ! $this->xml = xml_parser_create(); ! xml_set_object($this->xml, &$this); ! } ! ! function parse_file($url) { ! // debug("rdfparser::parse_file", "Now parsing $url"); ! ! xml_parser_set_option($this->xml, XML_OPTION_CASE_FOLDING, true); ! xml_set_element_handler($this->xml, "start_element", "end_element"); ! xml_set_character_data_handler($this->xml, "character_data"); ! ! $fpread = @fopen($url, "r"); ! if ( !($fpread) ) { ! // error in opening url ! $this->error_str = "rdfparser::parse_file could not open $url"; ! // debug("rdfparser::parse_file", $this->error_str); ! ! // Where does $err* come from? ! // debug("rdfparser::parse_file", "$errstr $errno"); ! } else { ! while (($this->error_str == "") && ($data = fread($fpread, 4096))) { ! if (!xml_parse($this->xml, $data, feof($fpread))) { ! // error ! $this->error_str = xml_error_string(xml_get_error_code($this->xml)) . " at line " . xml_get_current_line_number($this->xml); ! debug("rdfparser::parse_file", $this->error_str); ! } ! } ! fclose($fpread); ! if ($this->error_str == "") { ! // debug("rdfparser::parse_file", "Data parsed successfully!"); ! } ! } ! } ! } ! ! class Block_render_rss { ! var $type; ! var $output; ! var $rdf; ! ! /* constructor */ ! function Block_render_rss() { ! global $_PSL; ! ! $this->type = "rss"; /* set the 'type' */ ! $this->output = ""; /* clear the output */ ! $this->rdf = new rdfparser; ! $this->psl = $_PSL; ! } ! ! /* returns the TYPE of this class */ ! function getType() { ! return $this->type; ! } ! ! function parse($block_info) { ! global $_PSL; ! // debug("Block_render_rss::parse", "Starting RDF Block parsing"); ! ! $default_tpl = "rssblock.tpl"; ! ! $target = "_self"; ! $max_items = 10; ! $tpl = $default_tpl; ! ! if (is_array($block_info[block_options])) { ! if (is_string($block_info["block_options"]["max_items"])) { ! $max_items = $block_info["block_options"]["max_items"]; ! } ! if (is_string($block_info["block_options"]["target"])) { ! $target = $block_info["block_options"]["target"]; ! } ! if (is_string($block_info["block_options"]["tpl"])) { ! if (@file_exists($this->psl[templatedir] . "/" . basename($block_info[block_options][tpl]) . ".tpl") ) { ! // should be secure as path directives are discarded and extension added ! $tpl = basename($block_info["block_options"]["tpl"]) . ".tpl"; ! } ! } ! } ! ! // debug("Block_render_rss::parse", "setting parser with $item_element, $title_element, $link_element"); ! $this->rdf->parse_setup(); //$item_element, $title_element, $link_element); ! $this->rdf->parse_file($block_info['source_url']); ! ! if (empty($this->rdf->error_str)) { ! // debug("Block_render_rss::parse", "xml has no errors, making block"); ! // debug("rss::parse::channel",$this->rdf->channel); ! // debug("rss::parse::image",$this->rdf->image); ! // debug("rss::parse::items", $this->rdf->items); ! ! $template = new Template($this->psl["templatedir"]); ! $template->set_file ("block", $tpl); ! ! $template->set_block ("block", "channel_title","title_block"); ! $template->set_block ("block", "channel_image","image_block"); ! $template->set_block ("block", "channel_description","channeldescription_block"); ! $template->set_block ("block", "each_query", "query_block"); ! $template->set_block ("block", "each_description", "description_block"); ! ! // <title> and <image> tags seem to hold identical description and link info in most sites ! // ... so use an image if possible, else show title ! if (empty($this->rdf->image["url"])) { ! if ( !empty( $this->rdf->channel["title"]) ) { ! $template->set_var("CHANNEL_TITLE", $this->rdf->channel["title"]); ! $template->set_var("CHANNEL_LINK", empty($this->rdf->channel["link"])?"#":$this->rdf->channel["link"]); ! $template->parse("title_block","channel_title"); ! } ! } else { ! $template->set_var(array( ! "IMAGE_URL" => $this->rdf->image["url"], ! "IMAGE_TITLE" => $this->rdf->image["title"], ! "IMAGE_LINK" => $this->rdf->image["link"], ! )); ! $template->parse("image_block","channel_image"); ! } ! ! if ( !empty( $this->rdf->channel["description"]) ) { ! $template->set_var("CHANNEL_DESCRIPTION", $this->rdf->channel["description"]); ! $template->parse("channeldescription_block","channel_description",true); ! } ! ! $numitems = min($max_items, $this->rdf->count); ! // debug("rss::numitems",$numitems); ! for ($items = 0; $items < $numitems; $items++ ) { ! $template->set_var(array( ! "TITLE" => $this->rdf->items[$items]["title"], ! "LINK" => $this->rdf->items[$items]["link"] ! )); ! $template->parse ("query_block", "each_query", true); ! ! if (!empty($this->rdf->items[$items]["description"] )) { ! $template->set_var("DESCRIPTION",$this->rdf->items[$items]["description"] ); ! $template->parse ("query_block", "each_description", true); ! } ! } ! ! $template->set_var(array( ! "TARGET" => $target, ! "ROOTDIR" => $this->psl["rooturl"], ! "IMAGEDIR" => $this->psl["imageurl"] ! )); ! $this->output = $template->parse(OUT,"block"); ! $this->title = $this->rdf->channel["title"]; ! // debug("rss::parse::title", $this->title); ! ! return true; ! ! } else { ! ! debug("Block_render_rss::parse error", $this->rdf->error_str); ! $this->output = "Error in source file:".$this->rdf->error_str; ! // $this->output = ""; ! ! return false; ! } ! ! } ! ! function getFinal() { ! return $this->output; ! } ! ! function getTitle() { ! // $this->title = "RSS Channel"; ! // debug("rss::parse::getTitle", $this->title); ! return $this->title; ! } ! } ! ! ?> --- 1,327 ---- ! <?php ! ! /* Block_render_rss.class -> Methods for parsing RSS 0.91 data */ ! /* CHANGES: 4Jan02 - RSS title stored */ ! /* $Id$ */ ! /* ! * VARAIBLES USED ! * target = [_blank],_self etc ! * max = 10 ! * tpl = alternate template ( no .tpl extension) [rssblock.tpl] ! * ! * NOTES ! * - image width and height are not used since most sites seem not to give this info anyway ! * - rdfparser ignores max_items - it pulls everything it can from the RDF file ! */ ! class rdfparser { ! ! // Settings ! var $max_items; ! var $tags; // tags to process (all others are ignored) ! ! // Output information ! var $channel; ! var $image; ! var $items; ! ! var $error_str = ""; /* if you got an error reading a file this will store an error */ ! ! // Private ! var $xml; ! var $node; ! var $current; ! var $count; ! ! /*************************************** ! ** Constructor function. See parse_setup ! ***************************************/ ! function rdfparser() { ! } ! ! /*************************************** ! ** Start element function. ! ***************************************/ ! function start_element($xml, $element, $attributes) { ! ! $this->current = $element; ! ! switch ($element) { ! case $this->tags["item"]: ! case $this->tags["image"]: ! case $this->tags["channel"]: ! $this->node = $element; // Should be a stack really, but nesting is only one deep ! // debug("rdf:start element+node","$element+".$this->node); ! break; ! ! default: ! } ! ! } ! ! /*************************************** ! ** End element function. ! ***************************************/ ! function end_element($xml, $element) { ! $this->current = ""; ! ! switch ($element) { ! case $this->tags["item"]: ! $this->node = ""; ! $this->count++; ! break; ! case $this->tags["channel"]: ! case $this->tags["image"]: ! $this->node = ""; ! break; ! } ! } ! ! function character_data($xml, $data) { ! ! switch ($this->node) { ! ! case $this->tags["item"]: ! switch ($this->current) { ! case $this->tags["title"]: ! $this->items[$this->count]["title"] .= $data; ! break; ! case $this->tags["link"]: ! $this->items[$this->count]["link"] .= $data; ! break; ! case $this->tags["description"]: ! $this->items[$this->count]["description"] .= $data; ! break; ! default: ! } ! break; ! ! case $this->tags["image"]: ! switch ($this->current) { ! case $this->tags["title"]: ! $this->image["title"] .= $data; ! break; ! case $this->tags["link"]: ! $this->image["link"] .= $data; ! break; ! case $this->tags["url"]: ! $this->image["url"] .= $data; ! break; ! default: ! } ! break; ! ! case $this->tags["channel"]: ! switch ($this->current) { ! case $this->tags["title"]: ! $this->channel["title"] .= $data; ! break; ! case $this->tags["link"]: ! $this->channel["link"] .= $data; ! break; ! case $this->tags["description"]: ! $this->channel["description"] .= $data; ! break; ! default: ! } ! break; ! ! default: ! } ! } ! ! function parse_setup($tags="",$max_items="") { ! ! if (is_array($tags)) { ! $this->tags = $tags; ! } else { ! // standard rdf setup - must be upper case (assuming case-folding is on which is PHP's default) ! $this->tags = array("channel" => "CHANNEL", ! "image" => "IMAGE", ! "item" => "ITEM", ! "title" => "TITLE", ! "link" => "LINK", ! "url" => "URL", ! "description" => "DESCRIPTION" ); ! } ! ! // Internal initialisation ! $this->count = 0; ! $this->node = ""; // can be "" (ie channel), "item" or "image" ! $this->current = array(); // element stack ! ! $this->error_str = ""; ! ! $this->channel = array("title"=>"", "link"=>"", "description" => ""); ! $this->image = array("title"=>"", "link"=>""); ! $this->items = array(); ! ! $this->xml = xml_parser_create(); ! xml_set_object($this->xml, &$this); ! } ! ! function parse_file($url) { ! // debug("rdfparser::parse_file", "Now parsing $url"); ! ! xml_parser_set_option($this->xml, XML_OPTION_CASE_FOLDING, true); ! xml_set_element_handler($this->xml, "start_element", "end_element"); ! xml_set_character_data_handler($this->xml, "character_data"); ! ! $fpread = @fopen($url, "r"); ! if ( !($fpread) ) { ! // error in opening url ! $this->error_str = "rdfparser::parse_file could not open $url"; ! // debug("rdfparser::parse_file", $this->error_str); ! ! // Where does $err* come from? ! // debug("rdfparser::parse_file", "$errstr $errno"); ! } else { ! while (($this->error_str == "") && ($data = fread($fpread, 4096))) { ! if (!xml_parse($this->xml, $data, feof($fpread))) { ! // error ! $this->error_str = xml_error_string(xml_get_error_code($this->xml)) . " at line " . xml_get_current_line_number($this->xml); ! debug("rdfparser::parse_file", $this->error_str); ! } ! } ! fclose($fpread); ! if ($this->error_str == "") { ! // debug("rdfparser::parse_file", "Data parsed successfully!"); ! } ! } ! } ! } ! ! class Block_render_rss { ! var $type; ! var $output; ! var $rdf; ! ! /* constructor */ ! function Block_render_rss() { ! global $_PSL; ! ! $this->type = "rss"; /* set the 'type' */ ! $this->output = ""; /* clear the output */ ! $this->rdf = new rdfparser; ! $this->psl = $_PSL; ! } ! ! /* returns the TYPE of this class */ ! function getType() { ! return $this->type; ! } ! ! function... [truncated message content] |
From: nathan h. <nh...@us...> - 2002-02-03 02:49:42
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory usw-pr-cvs1:/tmp/cvs-serv13222/public_html Modified Files: config.php3 index.php3 Log Message: made class files and such use quoted strings in arrays Index: config.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config.php3,v retrieving revision 1.121 retrieving revision 1.122 diff -C2 -d -r1.121 -r1.122 *** config.php3 2002/01/05 20:45:45 1.121 --- config.php3 2002/02/03 02:49:40 1.122 *************** *** 31,115 **** ***************************************************/ ! $_PSL[phpself] = $PHP_SELF; // $basedir -> Complete filesystem path to the pages ! $_PSL[basedir] = '/home/nathan/webDevel/phpslash-ft/public_html'; // $templatedir -> Path to the templates directory ! $_PSL[templatedir] = $_PSL[basedir] . '/templates'; // $classdir -> Path to the class directory ! $_PSL[classdir] = '/home/nathan/webDevel/phpslash-ft/class'; // $rooturl -> The base URL for the phpslash site ! $_PSL[rooturl] = 'http://fatboy.mystic/ft'; // $adminurl -> The base URL for the admin pages ! $_PSL[adminurl] = $_PSL[rooturl] . '/admin'; // $imageurl -> The base URL for images that pertain to phpslash ! $_PSL[imageurl] = $_PSL[rooturl] . '/images'; // topicimageurl -> the url for all the topic images. ! $_PSL[topicimageurl] = $_PSL[imageurl] . "/topics"; // topicimagedir -> the full directory path to the topic images. ! $_PSL[topicimagedir] = $_PSL[basedir] . "/images" . "/topics"; // 1.11.2) Debug options ! $_PSL[debug] = false; // true for on, false for off ! $_PSL[debug_type] = 'now'; // 'now' for output to browser // 'log' for output to the admin log // 1.11.3) Informational Logging -> true for on, false for off ! $_PSL[use_infolog] = true; // Use to turn on / off logging // 1.11.4) Other Variables... ! $_PSL[DB_Host] = "localhost"; ! $_PSL[DB_Database] = "phpslash"; ! $_PSL[DB_User] = "phpslash"; ! $_PSL[DB_Password] = "bar"; ! $_PSL[module][Glossary] = true; ! $_PSL[module][MailingList] = true; ! $_PSL[module][Block] = true; ! $_PSL[module][Comment] = true; ! $_PSL[module][TopicBar] = true; ! $_PSL[module][NavBar] = true; ! $_PSL[module][Poll] = true; ! $_PSL[module][Section] = true; ! $_PSL[module][Story] = true; ! $_PSL[module][Submission] = true; ! $_PSL[module][Infolog] = true; ! $_PSL[module][Author] = true; ! $_PSL[module][Variable] = false; ! $_PSL[show_admin_on_navbar] = true; // turns the Admin link on in the navbar ! $_PSL[default_pending] = false; // decides if new comments are marked pending // basically allows you to moderate the posts. ! $_PSL[poll_max_answers] = 8; // When creating a poll, you have a question // and up to $max_poll_answers answers. ! $_PSL[home_section_id] = 3; // There is a "main" section. When people // load up your site for the first time this // section is displayed. Put the section_id // of that field here. ! $_PSL[censorfile] = $_PSL[basedir] . "/censor.php3"; //comment to disable comment censor ! // $_PSL[censorfile] = "/var/www/phorum-3.2.1/include/censor.php"; //use phorum's censor file ! $_PSL[localedir] = $_PSL[classdir] . "/locale"; // directory holding language files ! $_PSL[language] = "en"; // default language ( ISO format) ! $_PSL[article_updatehits] = true; // Keeps track of hits on a story, // the drawback is an extra DB query. ! $_PSL[site_name] = "PHPSlash"; ! $_PSL[site_owner] = "in...@ph..."; ! $_PSL[site_slogan] = "Slash for you, Slash for me"; ! $_PSL[site_title] = "PHPSlash: The Web Stops Here"; ! $_PSL[mailinglist_subject] = "PHPSlash Times"; // metatags that may need to be overwritten later ( article description). --- 31,117 ---- ***************************************************/ ! // $PHP_SELF doesn't pop up in $GLOBALS with register_globals turned off ! //$_PSL['phpself'] = $PHP_SELF; ! $_PSL['phpself'] = $HTTP_SERVER_VARS['PHP_SELF']; // $basedir -> Complete filesystem path to the pages ! $_PSL['basedir'] = '/home/nathan/webDevel/phpslash-ft/public_html'; // $templatedir -> Path to the templates directory ! $_PSL['templatedir'] = $_PSL['basedir'] . '/templates'; // $classdir -> Path to the class directory ! $_PSL['classdir'] = '/home/nathan/webDevel/phpslash-ft/class'; // $rooturl -> The base URL for the phpslash site ! $_PSL['rooturl'] = 'http://fatboy.mystic/ft'; // $adminurl -> The base URL for the admin pages ! $_PSL['adminurl'] = $_PSL['rooturl'] . '/admin'; // $imageurl -> The base URL for images that pertain to phpslash ! $_PSL['imageurl'] = $_PSL['rooturl'] . '/images'; // topicimageurl -> the url for all the topic images. ! $_PSL['topicimageurl'] = $_PSL['imageurl'] . "/topics"; // topicimagedir -> the full directory path to the topic images. ! $_PSL['topicimagedir'] = $_PSL['basedir'] . "/images" . "/topics"; // 1.11.2) Debug options ! $_PSL['debug'] = false; // true for on, false for off ! $_PSL['debug_type'] = 'now'; // 'now' for output to browser // 'log' for output to the admin log // 1.11.3) Informational Logging -> true for on, false for off ! $_PSL['use_infolog'] = true; // Use to turn on / off logging // 1.11.4) Other Variables... ! $_PSL['DB_Host'] = "localhost"; ! $_PSL['DB_Database'] = "pslft"; ! $_PSL['DB_User'] = "pslft"; ! $_PSL['DB_Password'] = "bar"; ! $_PSL['module']['Glossary'] = true; ! $_PSL['module']['MailingList'] = true; ! $_PSL['module']['Block'] = true; ! $_PSL['module']['Comment'] = true; ! $_PSL['module']['TopicBar'] = true; ! $_PSL['module']['NavBar'] = true; ! $_PSL['module']['Poll'] = true; ! $_PSL['module']['Section'] = true; ! $_PSL['module']['Story'] = true; ! $_PSL['module']['Submission'] = true; ! $_PSL['module']['Infolog'] = true; ! $_PSL['module']['Author'] = true; ! $_PSL['module']['Variable'] = false; ! $_PSL['show_admin_on_navbar'] = true; // turns the Admin link on in the navbar ! $_PSL['default_pending'] = false; // decides if new comments are marked pending // basically allows you to moderate the posts. ! $_PSL['poll_max_answers'] = 8; // When creating a poll, you have a question // and up to $max_poll_answers answers. ! $_PSL['home_section_id'] = 3; // There is a "main" section. When people // load up your site for the first time this // section is displayed. Put the section_id // of that field here. ! $_PSL['censorfile'] = $_PSL['basedir'] . "/censor.php3"; //comment to disable comment censor ! // $_PSL['censorfile'] = "/var/www/phorum-3.2.1/include/censor.php"; //use phorum's censor file ! $_PSL['localedir'] = $_PSL['classdir'] . "/locale"; // directory holding language files ! $_PSL['language'] = "en"; // default language ( ISO format) ! $_PSL['article_updatehits'] = true; // Keeps track of hits on a story, // the drawback is an extra DB query. ! $_PSL['site_name'] = "PHPSlash"; ! $_PSL['site_owner'] = "in...@ph..."; ! $_PSL['site_slogan'] = "Slash for you, Slash for me"; ! $_PSL['site_title'] = "PHPSlash: The Web Stops Here"; ! $_PSL['mailinglist_subject'] = "PHPSlash Times"; // metatags that may need to be overwritten later ( article description). *************** *** 118,122 **** $metatags['description'] = "phpSlash is a port of the slash-0.2 code from Perl to PHP. Since it was first started, phpslash has become a different beast of its own. It currently boasts full HTML templates, an OO design, the ability to operate in a hosted environment, and a bunch of other goodies."; ! $_PSL[metatags] = $metatags; /* --- 120,124 ---- $metatags['description'] = "phpSlash is a port of the slash-0.2 code from Perl to PHP. Since it was first started, phpslash has become a different beast of its own. It currently boasts full HTML templates, an OO design, the ability to operate in a hosted environment, and a bunch of other goodies."; ! $_PSL['metatags'] = $metatags; /* *************** *** 135,157 **** */ ! $_PSL[comment_defaultmode] = "nested"; ! $_PSL[search_maxresults] = 20; /* the number of results to return when searching */ ! $_PSL[allow_comment_search] = TRUE; /* Do we allow search od the comments as well? */ /* if set to true then when you click "edit as story", the submission will automatically be deleted wheather or not you finished saving the story */ ! $_PSL[submission_autodelete] = false; /* the name of the default section when you pull up the site */ ! $_PSL[site_homesection] = "Home"; /* when you turn these on you'll probably get a full table scan! */ ! $_PSL[article_nextprevlinks] = true; /* the minimum number of options available for a block. */ ! $_PSL[block_optioncount] = 4; // 1.2) Other PHPLIB things not already included. Comment out if this --- 137,159 ---- */ ! $_PSL['comment_defaultmode'] = "nested"; ! $_PSL['search_maxresults'] = 20; /* the number of results to return when searching */ ! $_PSL['allow_comment_search'] = TRUE; /* Do we allow search od the comments as well? */ /* if set to true then when you click "edit as story", the submission will automatically be deleted wheather or not you finished saving the story */ ! $_PSL['submission_autodelete'] = false; /* the name of the default section when you pull up the site */ ! $_PSL['site_homesection'] = "Home"; /* when you turn these on you'll probably get a full table scan! */ ! $_PSL['article_nextprevlinks'] = true; /* the minimum number of options available for a block. */ ! $_PSL['block_optioncount'] = 4; // 1.2) Other PHPLIB things not already included. Comment out if this *************** *** 162,170 **** // 1.3) PHPSlash functions library ! require($_PSL[classdir] . '/functions.inc'); /* now that the functions are in, we can define the arg_separator */ ! $_PSL[amp] = arg_separator("1"); // 1.99) Add any other require()'s or include()'s you need here and they --- 164,172 ---- // 1.3) PHPSlash functions library ! require($_PSL['classdir'] . '/functions.inc'); /* now that the functions are in, we can define the arg_separator */ ! $_PSL['amp'] = arg_separator("1"); // 1.99) Add any other require()'s or include()'s you need here and they *************** *** 172,180 **** $lang = false; // comment to enable setting lang in url ! $_PSL[languagefile] = $_PSL[localedir] . "/" . $_PSL[language] . ".php3"; ! $_PSL[languagefile] = setLang($lang); // comment to disable auto lang detection ! $_PSL[templatedir] = setLangTpl($lang); // comment to disable auto tpl lang detection ! $_PSL[defaultskin] = "default"; ! $_PSL[templatedir] = setSkinTpl($HTTP_GET_VARS[skin], "cookie"); // comment to disable setting theme in url // NavBar Menu Definitions --- 174,182 ---- $lang = false; // comment to enable setting lang in url ! $_PSL['languagefile'] = $_PSL['localedir'] . "/" . $_PSL['language'] . ".php3"; ! $_PSL['languagefile'] = setLang($lang); // comment to disable auto lang detection ! $_PSL['templatedir'] = setLangTpl($lang); // comment to disable auto tpl lang detection ! $_PSL['defaultskin'] = "default"; ! $_PSL['templatedir'] = setSkinTpl($HTTP_GET_VARS['skin'], "cookie"); // comment to disable setting theme in url // NavBar Menu Definitions *************** *** 195,312 **** $menuitem[] = array( ! name => "Home", ! link => $_PSL['rooturl'] . "/", ! perm => "nobody", ! module => "" ); $menuitem[] = array( ! name => "Add Story", ! link => $_PSL['rooturl'] . "/submission.php3", ! perm => "nobody", ! module => "Submission" ); $menuitem[] = array( ! name => "Glossary", ! link => $_PSL['rooturl'] . "/glossary.php3", ! perm => "nobody", ! module => "Glossary" ); $menuitem[] = array( ! name => "Archives", ! link => $_PSL['rooturl'] . "/search.php3", ! perm => "nobody", ! module => "" ); $menuitem[] = array( ! name => "Polls", ! link => $_PSL['rooturl'] . "/poll.php3", ! perm => "nobody", ! module => "Poll" ); $menuitem[] = array( ! name => "Mailing List", ! link => $_PSL['rooturl'] . "/mailinglist.php3", ! perm => "nobody", ! module => "MailingList" ); $menuitem[] = array( ! name => "About", ! link => $_PSL['rooturl'] . "/about.php3", ! perm => "nobody", ! module => "" ); $menuitem[] = array( ! name => "User", ! link => $_PSL['rooturl'] . "/login.php3", ! perm => "user", ! module => "" ); $menuitem[] = array( ! name => "Topic", ! link => $_PSL['adminurl'] . "/topicAdmin.php3", ! perm => "topic", ! module => "" ); $menuitem[] = array( ! name => "Story", ! link => $_PSL['adminurl'] . "/storyAdmin.php3", ! perm => "story", ! module => "Story" ); $menuitem[] = array( ! name => "Submission", ! link => $_PSL['adminurl'] . "/submissionAdmin.php3", ! perm => "submission", ! module => "Submission" ); $menuitem[] = array( ! name => "Section", ! link => $_PSL['adminurl'] . "/sectionAdmin.php3", ! perm => "section", ! module => "Section" ); $menuitem[] = array( ! name => "Block", ! link => $_PSL['adminurl'] . "/blockAdmin.php3", ! perm => "block", ! module => "Block" ); $menuitem[] = array( ! name => "Poll", ! link => $_PSL['adminurl'] . "/pollAdmin.php3", ! perm => "poll", ! module => "Poll" ); $menuitem[] = array( ! name => "Mailing List", ! link => $_PSL['adminurl'] . "/mailinglistAdmin.php3", ! perm => "mailinglist", ! module => "MailingList" ); $menuitem[] = array( ! name => "Author", ! link => $_PSL['adminurl'] . "/authorAdmin.php3", ! perm => "author", ! module => "Author" ); $menuitem[] = array( ! name => "Glossary", ! link => $_PSL['adminurl'] . "/glossaryAdmin.php3", ! perm => "glossary", ! module => "Glossary" ); $menuitem[] = array( ! name => "Variable", ! link => $_PSL['adminurl'] . "/variableAdmin.php3", ! perm => "variable", ! module => "Variable" ); $menuitem[] = array( ! name => "Logging", ! link => $_PSL['adminurl'] . "/infologAdmin.php3", ! perm => "logging", ! module => "Infolog" ); --- 197,314 ---- $menuitem[] = array( ! 'name' => "Home", ! 'link' => $_PSL['rooturl'] . "/", ! 'perm' => "nobody", ! 'module' => "" ); $menuitem[] = array( ! 'name' => "Add Story", ! 'link' => $_PSL['rooturl'] . "/submission.php3", ! 'perm' => "nobody", ! 'module' => "Submission" ); $menuitem[] = array( ! 'name' => "Glossary", ! 'link' => $_PSL['rooturl'] . "/glossary.php3", ! 'perm' => "nobody", ! 'module' => "Glossary" ); $menuitem[] = array( ! 'name' => "Archives", ! 'link' => $_PSL['rooturl'] . "/search.php3", ! 'perm' => "nobody", ! 'module' => "" ); $menuitem[] = array( ! 'name' => "Polls", ! 'link' => $_PSL['rooturl'] . "/poll.php3", ! 'perm' => "nobody", ! 'module' => "Poll" ); $menuitem[] = array( ! 'name' => "Mailing List", ! 'link' => $_PSL['rooturl'] . "/mailinglist.php3", ! 'perm' => "nobody", ! 'module' => "MailingList" ); $menuitem[] = array( ! 'name' => "About", ! 'link' => $_PSL['rooturl'] . "/about.php3", ! 'perm' => "nobody", ! 'module' => "" ); $menuitem[] = array( ! 'name' => "User", ! 'link' => $_PSL['rooturl'] . "/login.php3", ! 'perm' => "user", ! 'module' => "" ); $menuitem[] = array( ! 'name' => "Topic", ! 'link' => $_PSL['adminurl'] . "/topicAdmin.php3", ! 'perm' => "topic", ! 'module' => "" ); $menuitem[] = array( ! 'name' => "Story", ! 'link' => $_PSL['adminurl'] . "/storyAdmin.php3", ! 'perm' => "story", ! 'module' => "Story" ); $menuitem[] = array( ! 'name' => "Submission", ! 'link' => $_PSL['adminurl'] . "/submissionAdmin.php3", ! 'perm' => "submission", ! 'module' => "Submission" ); $menuitem[] = array( ! 'name' => "Section", ! 'link' => $_PSL['adminurl'] . "/sectionAdmin.php3", ! 'perm' => "section", ! 'module' => "Section" ); $menuitem[] = array( ! 'name' => "Block", ! 'link' => $_PSL['adminurl'] . "/blockAdmin.php3", ! 'perm' => "block", ! 'module' => "Block" ); $menuitem[] = array( ! 'name' => "Poll", ! 'link' => $_PSL['adminurl'] . "/pollAdmin.php3", ! 'perm' => "poll", ! 'module' => "Poll" ); $menuitem[] = array( ! 'name' => "Mailing List", ! 'link' => $_PSL['adminurl'] . "/mailinglistAdmin.php3", ! 'perm' => "mailinglist", ! 'module' => "MailingList" ); $menuitem[] = array( ! 'name' => "Author", ! 'link' => $_PSL['adminurl'] . "/authorAdmin.php3", ! 'perm' => "author", ! 'module' => "Author" ); $menuitem[] = array( ! 'name' => "Glossary", ! 'link' => $_PSL['adminurl'] . "/glossaryAdmin.php3", ! 'perm' => "glossary", ! 'module' => "Glossary" ); $menuitem[] = array( ! 'name' => "Variable", ! 'link' => $_PSL['adminurl'] . "/variableAdmin.php3", ! 'perm' => "variable", ! 'module' => "Variable" ); $menuitem[] = array( ! 'name' => "Logging", ! 'link' => $_PSL['adminurl'] . "/infologAdmin.php3", ! 'perm' => "logging", ! 'module' => "Infolog" ); *************** *** 324,328 **** // 2.2) PHPLIB Perm Class extension ! $_PSL[perm_array] = array( "nobody" => 2, "user" => 4, --- 326,330 ---- // 2.2) PHPLIB Perm Class extension ! $_PSL['perm_array'] = array( "nobody" => 2, "user" => 4, *************** *** 343,352 **** // 2.3) PHPSlash<->phplib interface classes ! require($_PSL[classdir] . "/slashDB.class"); ! require($_PSL[classdir] . "/slash_sql.class"); ! require($_PSL[classdir] . "/slashSess.class"); ! // require($_PSL[classdir] . "/slashAuth.class"); ! require($_PSL[classdir] . "/slashAuthCR.class"); ! require($_PSL[classdir] . "/slashPerm.class"); // 2.2) PHPLIB Session Support --- 345,354 ---- // 2.3) PHPSlash<->phplib interface classes ! require($_PSL['classdir'] . "/slashDB.class"); ! require($_PSL['classdir'] . "/slash_sql.class"); ! require($_PSL['classdir'] . "/slashSess.class"); ! // require($_PSL['classdir'] . "/slashAuth.class"); ! require($_PSL['classdir'] . "/slashAuthCR.class"); ! require($_PSL['classdir'] . "/slashPerm.class"); // 2.2) PHPLIB Session Support *************** *** 355,389 **** // SECTION 3 - PHPSLASH CLASS CONFIGURATION ------------------------------ ////////////////////////////////////////////////////////////////////////// ! # require($_PSL[classdir] . "/Variable.class"); ! if ($_PSL[module][Comment]) { ! require($_PSL[classdir] . "/Comment.class"); } ! if ($_PSL[module][Poll]) { ! require($_PSL[classdir] . "/Poll.class"); } ! if ($_PSL[module][Story]) { ! require($_PSL[classdir] . "/Story_base.class"); ! require($_PSL[classdir] . "/Story.class"); } ! require($_PSL[classdir] . "/Topic.class"); ! require($_PSL[classdir] . "/Section.class"); ! if ($_PSL[module][Submission]) { ! require($_PSL[classdir] . "/Submission.class"); } ! if ($_PSL[module][TopicBar]) { ! require($_PSL[classdir] . "/TopicBar.class"); } ! if ($_PSL[module][NavBar]) { ! require($_PSL[classdir] . "/NavBar.class"); } ! if ($_PSL[module][Block]) { ! require($_PSL[classdir] . "/Block_i.class"); } ! require($_PSL[classdir] . "/Author.class"); ! if ($_PSL[module][Glossary]) { ! require($_PSL[classdir] . "/Glossary.class"); } ! if ($_PSL[module][MailingList]) { ! require($_PSL[classdir] . "/MailingList.class"); } --- 357,405 ---- // SECTION 3 - PHPSLASH CLASS CONFIGURATION ------------------------------ ////////////////////////////////////////////////////////////////////////// ! // TODO: nh: Re-write this in a for loop ! ! # require($_PSL['classdir'] . "/Variable.class"); ! ! if ($_PSL['module']['Comment']) { ! require($_PSL['classdir'] . "/Comment.class"); } ! ! if ($_PSL['module']['Poll']) { ! require($_PSL['classdir'] . "/Poll.class"); } ! ! if ($_PSL['module']['Story']) { ! require($_PSL['classdir'] . "/Story_base.class"); ! require($_PSL['classdir'] . "/Story.class"); } ! ! require($_PSL['classdir'] . "/Topic.class"); ! ! require($_PSL['classdir'] . "/Section.class"); ! ! if ($_PSL['module']['Submission']) { ! require($_PSL['classdir'] . "/Submission.class"); } ! ! if ($_PSL['module']['TopicBar']) { ! require($_PSL['classdir'] . "/TopicBar.class"); } ! ! if ($_PSL['module']['NavBar']) { ! require($_PSL['classdir'] . "/NavBar.class"); } ! ! if ($_PSL['module']['Block']) { ! require($_PSL['classdir'] . "/Block_i.class"); } ! ! require($_PSL['classdir'] . "/Author.class"); ! ! if ($_PSL['module']['Glossary']) { ! require($_PSL['classdir'] . "/Glossary.class"); } ! ! if ($_PSL['module']['MailingList']) { ! require($_PSL['classdir'] . "/MailingList.class"); } *************** *** 399,403 **** * 1 means accept the tag only: <foo> */ ! $_PSL[approvedtags] = array( "p"=>2, "b"=>1, --- 415,419 ---- * 1 means accept the tag only: <foo> */ ! $_PSL['approvedtags'] = array( "p"=>2, "b"=>1, *************** *** 419,442 **** always set expirerelated >= expirestory */ ! $_PSL[expirestory] = 0; ! $_PSL[expirerelated] = 14400; /* ============= Things to deprecate ============= */ ! if ($sitename=="") $sitename = $_PSL[site_name]; ! if ($siteowner=="") $siteowner = $_PSL[site_owner]; ! $basedir = $_PSL[basedir]; ! $templatedir = $_PSL[templatedir]; ! $classdir = $_PSL[classdir]; ! $rootdir = $_PSL[rooturl]; ! $admindir = $_PSL[adminurl]; ! $imagedir = $_PSL[imageurl]; ! $debug = $_PSL[debug]; ! $debug_type = $_PSL[debug_type]; ! $infolog_enable = $_PSL[use_infolog]; ! $default_pending = $_PSL[default_pending]; ! $show_admin_on_navbar = $_PSL[show_admin_on_navbar]; ! $max_poll_answers = $_PSL[poll_max_answers]; ?> --- 435,458 ---- always set expirerelated >= expirestory */ ! $_PSL['expirestory'] = 0; ! $_PSL['expirerelated'] = 14400; /* ============= Things to deprecate ============= */ ! if ($sitename=="") $sitename = $_PSL['site_name']; ! if ($siteowner=="") $siteowner = $_PSL['site_owner']; ! $basedir = $_PSL['basedir']; ! $templatedir = $_PSL['templatedir']; ! $classdir = $_PSL['classdir']; ! $rootdir = $_PSL['rooturl']; ! $admindir = $_PSL['adminurl']; ! $imagedir = $_PSL['imageurl']; ! $debug = $_PSL['debug']; ! $debug_type = $_PSL['debug_type']; ! $infolog_enable = $_PSL['use_infolog']; ! $default_pending = $_PSL['default_pending']; ! $show_admin_on_navbar = $_PSL['show_admin_on_navbar']; ! $max_poll_answers = $_PSL['poll_max_answers']; ?> Index: index.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/index.php3,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** index.php3 2002/01/15 21:50:38 1.52 --- index.php3 2002/02/03 02:49:40 1.53 *************** *** 25,33 **** /* defaults for main "index" page */ if ((!$section) AND (!$section_id)){ ! $section = $_PSL[site_homesection]; if(!$section) { $section = "Home"; } ! $ary[section] = $section; } else { $pagetitle .= " - $section"; --- 25,33 ---- /* defaults for main "index" page */ if ((!$section) AND (!$section_id)){ ! $section = $_PSL['site_homesection']; if(!$section) { $section = "Home"; } ! $ary['section'] = $section; } else { $pagetitle .= " - $section"; *************** *** 62,83 **** } ! $template = new Template($_PSL[templatedir]); $template->debug = 0; $template->set_file(array( ! index => $tplfile //"index3col.tpl" )); $template->set_var(array( ! ROOTDIR => $_PSL[rooturl], ! IMAGEDIR => $_PSL[imageurl], ! BREADCRUMB => $breadcrumb, ! STORY_COLUMN => $allstories, ! LEFT_BLOCK_COLUMN => $leftblocks, ! CENTER_BLOCK_COLUMN => $centerblocks, ! RIGHT_BLOCK_COLUMN => $rightblocks )); ! $template->parse(OUT,"index"); ! $template->p(OUT); slashfoot(); --- 62,83 ---- } ! $template = new Template($_PSL['templatedir']); $template->debug = 0; $template->set_file(array( ! 'index' => $tplfile //"index3col.tpl" )); $template->set_var(array( ! 'ROOTDIR' => $_PSL['rooturl'], ! 'IMAGEDIR' => $_PSL['imageurl'], ! 'BREADCRUMB' => $breadcrumb, ! 'STORY_COLUMN' => $allstories, ! 'LEFT_BLOCK_COLUMN' => $leftblocks, ! 'CENTER_BLOCK_COLUMN' => $centerblocks, ! 'RIGHT_BLOCK_COLUMN' => $rightblocks )); ! $template->parse('OUT',"index"); ! $template->p('OUT'); slashfoot(); |
From: nathan h. <nh...@us...> - 2002-02-03 02:49:42
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv13222 Modified Files: CHANGES Log Message: made class files and such use quoted strings in arrays Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.384 retrieving revision 1.385 diff -C2 -d -r1.384 -r1.385 *** CHANGES 2002/02/02 21:01:19 1.384 --- CHANGES 2002/02/03 02:49:39 1.385 *************** *** 13,16 **** --- 13,24 ---- 9 - Removal of something (kill -9 :) + 2002-Feb-02 9:35PM EST nathan hruby <na...@ds...> + [W] - Went through all class files, functions.inc and config to + remove unquoted strings. Things like $ary[foo] are + now $ary['foo']. Also removed things like: + $bar = "$ary[foo]"; This is the first step in getting + things to run with register_globals=Off. + Everything in public_html/* still needs this done. + 2002-Feb-02 3:00PM CST Joe Stewart <jo...@be...> [B] - login.php3 - Made Nathan's suggested changes. Removed |
From: Joe S. <joe...@us...> - 2002-02-02 21:07:23
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv7561 Removed Files: Block_render_phpslash.class Log Message: removed - unused --- Block_render_phpslash.class DELETED --- |
From: Joe S. <joe...@us...> - 2002-02-02 21:01:24
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory usw-pr-cvs1:/tmp/cvs-serv6008/phpslash-ft/public_html Modified Files: login.php3 Log Message: login tweak Index: login.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/login.php3,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** login.php3 2002/01/09 17:11:29 1.12 --- login.php3 2002/02/02 21:01:20 1.13 *************** *** 6,14 **** page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); ! if (isset($cancel)) { Header("Location: " . $_PSL[rooturl]); // go home } ! if ($logout) { $username = $auth->auth['uname']; $auth->auth["error"] = sprintf(pslgetText("%s logged out."), $username); --- 6,15 ---- page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); ! if (isset($HTTP_POST_VARS['cancel'])) { Header("Location: " . $_PSL[rooturl]); // go home + die("\n"); // Kill script if not dead already, possible memory leak } ! if (isset($HTTP_GET_VARS['logout'])) { $username = $auth->auth['uname']; $auth->auth["error"] = sprintf(pslgetText("%s logged out."), $username); *************** *** 21,25 **** // Objects - // $poll = new Poll; $story = new Story; $block = new Block_i; --- 22,25 ---- |
From: Joe S. <joe...@us...> - 2002-02-02 21:01:23
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv6008/phpslash-ft Modified Files: CHANGES Log Message: login tweak Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.383 retrieving revision 1.384 diff -C2 -d -r1.383 -r1.384 *** CHANGES 2002/02/02 15:26:02 1.383 --- CHANGES 2002/02/02 21:01:19 1.384 *************** *** 13,16 **** --- 13,20 ---- 9 - Removal of something (kill -9 :) + 2002-Feb-02 3:00PM CST Joe Stewart <jo...@be...> + [B] - login.php3 - Made Nathan's suggested changes. Removed + Block_render_phpslash.class. + 2002-Feb-02 9:30AM CST Joe Stewart <jo...@be...> [T] - storyNew.tpl and blockEdit.tpl - widened the text entry fields. |
From: Joe S. <joe...@us...> - 2002-02-02 15:27:48
|
Update of /cvsroot/phpslash/phpslash-ft/doc/html In directory usw-pr-cvs1:/tmp/cvs-serv27116/phpslash-ft/doc/html Modified Files: phpslash.sgml Log Message: wider story entry fields Index: phpslash.sgml =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/doc/html/phpslash.sgml,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** phpslash.sgml 2002/02/01 21:39:02 1.12 --- phpslash.sgml 2002/02/02 15:27:46 1.13 *************** *** 630,633 **** --- 630,634 ---- backendTxt.tpl backendWml.tpl + blockEdit.tpl blocktypeList.tpl comment.tpl |
From: Joe S. <joe...@us...> - 2002-02-02 15:26:07
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default In directory usw-pr-cvs1:/tmp/cvs-serv26811/phpslash-ft/public_html/templates/en/default Modified Files: storyNew.tpl blockEdit.tpl Log Message: wider story entry fields Index: storyNew.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default/storyNew.tpl,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** storyNew.tpl 2001/12/14 21:19:40 1.10 --- storyNew.tpl 2002/02/02 15:26:02 1.11 *************** *** 53,60 **** </TABLE> Intro Text<BR> ! <TEXTAREA NAME="intro_text" WRAP="PHYSICAL" COLS="60" ROWS="10">{INTROTEXT}</TEXTAREA><BR> <P><P> Body Text<BR> ! <TEXTAREA NAME="body_text" WRAP="PHYSICAL" COLS="60" ROWS="10">{BODYTEXT}</TEXTAREA><BR> <B>New Story Options: </B> <input type=radio {PLAIN_CHKBOX} name=content value="plain"> Plain Text --- 53,60 ---- </TABLE> Intro Text<BR> ! <TEXTAREA NAME="intro_text" WRAP="PHYSICAL" COLS="75" ROWS="10">{INTROTEXT}</TEXTAREA><BR> <P><P> Body Text<BR> ! <TEXTAREA NAME="body_text" WRAP="PHYSICAL" COLS="75" ROWS="10">{BODYTEXT}</TEXTAREA><BR> <B>New Story Options: </B> <input type=radio {PLAIN_CHKBOX} name=content value="plain"> Plain Text Index: blockEdit.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default/blockEdit.tpl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** blockEdit.tpl 2000/11/19 10:00:08 1.6 --- blockEdit.tpl 2002/02/02 15:26:02 1.7 *************** *** 50,54 **** <TD>Data<BR><FONT SIZE=-1>(if type is <B>HTML</B>)</FONT></TD> <TD> ! <TEXTAREA NAME="cache_data" WRAP=PHYSICAL cols=30 rows=4>{CACHE_DATA}</TEXTAREA> </TD> </TR> --- 50,54 ---- <TD>Data<BR><FONT SIZE=-1>(if type is <B>HTML</B>)</FONT></TD> <TD> ! <TEXTAREA NAME="cache_data" cols=60 rows=4>{CACHE_DATA}</TEXTAREA> </TD> </TR> |
From: Joe S. <joe...@us...> - 2002-02-02 15:26:07
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv26811/phpslash-ft Modified Files: CHANGES Log Message: wider story entry fields Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.382 retrieving revision 1.383 diff -C2 -d -r1.382 -r1.383 *** CHANGES 2002/02/01 21:38:53 1.382 --- CHANGES 2002/02/02 15:26:02 1.383 *************** *** 13,16 **** --- 13,20 ---- 9 - Removal of something (kill -9 :) + 2002-Feb-02 9:30AM CST Joe Stewart <jo...@be...> + [T] - storyNew.tpl and blockEdit.tpl - widened the text entry fields. + phpslash.sgml. + 2002-Feb-01 3:30PM CST Joe Stewart <jo...@be...> [F] - Block Types can now be added and deleted from blockAdmin.php3. |
From: Joe S. <joe...@us...> - 2002-02-01 21:46:17
|
Update of /cvsroot/phpslash/phpslash-ft/tables/0.65 In directory usw-pr-cvs1:/tmp/cvs-serv24474/phpslash-ft/tables/0.65 Modified Files: slash-all.sql 6_to_65.sql Log Message: add/remove block_types Index: slash-all.sql =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/tables/0.65/slash-all.sql,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** slash-all.sql 2002/01/23 00:15:22 1.7 --- slash-all.sql 2002/02/01 21:38:59 1.8 *************** *** 137,140 **** --- 137,142 ---- INSERT INTO db_sequence (seq_name, nextid) VALUES ( 'psl_mailinglist_seq', '2'); INSERT INTO db_sequence (seq_name, nextid) VALUES ( 'psl_glossary_seq', '1'); + INSERT INTO db_sequence (seq_name, nextid) VALUES ( 'psl_blocktype_seq ', '10'); + # -------------------------------------------------------- Index: 6_to_65.sql =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/tables/0.65/6_to_65.sql,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** 6_to_65.sql 2002/01/23 00:15:22 1.6 --- 6_to_65.sql 2002/02/01 21:39:02 1.7 *************** *** 14,15 **** --- 14,16 ---- UPDATE psl_author SET password = MD5(CONCAT(author_name,":",password)); + INSERT INTO db_sequence (seq_name, nextid) VALUES ( 'psl_blocktype_seq ', '10'); |
From: Joe S. <joe...@us...> - 2002-02-01 21:46:17
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv24474/phpslash-ft Modified Files: CHANGES Log Message: add/remove block_types Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.381 retrieving revision 1.382 diff -C2 -d -r1.381 -r1.382 *** CHANGES 2002/02/01 04:23:52 1.381 --- CHANGES 2002/02/01 21:38:53 1.382 *************** *** 13,16 **** --- 13,22 ---- 9 - Removal of something (kill -9 :) + 2002-Feb-01 3:30PM CST Joe Stewart <jo...@be...> + [F] - Block Types can now be added and deleted from blockAdmin.php3. + [T] - new template - blocktypeList.tpl. + Affected files - blockAdmin.php3, Block.class, Block_i.class, + phpslash.sgml, slash-all.sql, 6_to_65.sql. + 2002-Jan-31 9:00AM CST Joe Stewart <jo...@be...> [W] - Added a skeleton config.php3 file to admin directory. All admin |
From: Joe S. <joe...@us...> - 2002-02-01 21:46:17
|
Update of /cvsroot/phpslash/phpslash-ft/doc/html In directory usw-pr-cvs1:/tmp/cvs-serv24474/phpslash-ft/doc/html Modified Files: phpslash.sgml Log Message: add/remove block_types Index: phpslash.sgml =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/doc/html/phpslash.sgml,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** phpslash.sgml 2002/01/17 22:16:41 1.11 --- phpslash.sgml 2002/02/01 21:39:02 1.12 *************** *** 630,633 **** --- 630,634 ---- backendTxt.tpl backendWml.tpl + blocktypeList.tpl comment.tpl commentDisplay.tpl *************** *** 1141,1144 **** --- 1142,1146 ---- blockEdit.tpl - manage blocks in blockAdmin blockList.tpl - list blocks in blockAdmin + blocktypeList.tpl - list block types in blockAdmin breadcrumb.tpl - display current section and topic calendar.tpl - calendar block |
From: Joe S. <joe...@us...> - 2002-02-01 21:46:17
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/admin In directory usw-pr-cvs1:/tmp/cvs-serv24474/phpslash-ft/public_html/admin Modified Files: blockAdmin.php3 Log Message: add/remove block_types Index: blockAdmin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/blockAdmin.php3,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** blockAdmin.php3 2002/02/01 04:23:52 1.2 --- blockAdmin.php3 2002/02/01 21:38:57 1.3 *************** *** 50,53 **** --- 50,54 ---- $block->newBlock(); /* prints the new block form */ $block->listBlock(); /* prints a list of current blocks */ + $block->listBlockTypes($option, $name); /* optional block type management */ } } else { |
From: Joe S. <joe...@us...> - 2002-02-01 21:46:17
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv24474/phpslash-ft/class Modified Files: Block.class Block_i.class Log Message: add/remove block_types Index: Block.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block.class,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Block.class 2002/01/08 21:38:23 1.8 --- Block.class 2002/02/01 21:38:55 1.9 *************** *** 82,86 **** $id = generateID("psl_blocktype_seq"); $type = addslashes($type); ! $this->db->query("INSERT INTO psl_block_type SET id='$id' type='$type'"); if ($this->db->affected_rows != 1) { echo "Block Type: $type added with an id of: $id"; --- 82,86 ---- $id = generateID("psl_blocktype_seq"); $type = addslashes($type); ! $this->db->query("INSERT INTO psl_block_type (id, name) VALUES ('$id','$type')"); if ($this->db->affected_rows != 1) { echo "Block Type: $type added with an id of: $id"; *************** *** 89,93 **** } } ! /** * getBlock - returns a block from an id --- 89,142 ---- } } ! ! ! /* deleteType - deletes the type from the db ! * ! * Given the type_name, it deletes that from the psl_block_type table. ! * IT check and make sure there are NO blocks associated with this ! * block_type before deleting it. Returns true if block_type is deleted, ! * false if not. ! * ! * @param integer type_name ! * ! * @access public ! */ ! function deleteType($type_name) { ! ! $go_ahead = true; ! ! if (!$type_name) { ! return false; ! } ! ! /* check for any blocks associated with this type_name */ ! ! $q = "SELECT psl_block.title ! FROM psl_block, ! psl_block_type ! WHERE psl_block.type = psl_block_type.id ! AND psl_block_type.name = '$type_name'"; ! $this->db->query($q); ! while ($this->db->next_record()) { ! $go_ahead = false; ! $title = $this->db->Record["title"]; ! echo "Sorry, this block_type($type_name) is assigned to this block:"; ! echo "<font color=\"red\">'$title'</font><br />\n"; ! } ! ! if (!$go_ahead) { ! return false; ! } else { ! $q = "DELETE ! FROM psl_block_type ! WHERE name = '$type_name'"; ! $this->db->query($q); ! echo "<i>Block Type $type_name deleted</i>"; ! ! return true; ! } ! } ! ! /** * getBlock - returns a block from an id Index: Block_i.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_i.class,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Block_i.class 2002/01/22 12:25:07 1.12 --- Block_i.class 2002/02/01 21:38:56 1.13 *************** *** 389,392 **** --- 389,472 ---- } } + + /** + * listBlockTypes - display a list of all available block types + * + * displays the complete list of available block types + * Used only by admin + * + * @param string option + * @access public + */ + function listBlockTypes($option="", $name="") { + + $this->templ = new Template($this->psl[templatedir]); + $this->templ->debug = 0; + $this->templ->set_file(array( + listblocktypes => "blocktypeList.tpl" + )); + + titlebar("100%","Manage Block Types"); + + if( $option == "all") { + + $fulldirlist = dir($this->psl[classdir]); + $i=1; + while( $eachfile = $fulldirlist->read()) { + $each = $this->psl[classdir] . "/" . $eachfile; + if( (is_file($each)) AND + ( $each != ".") AND + ( $each != "..") AND + ( $each != "CVS") AND + ( preg_match('/Block_render_/i', $each)) ) { + + $eachtype = str_replace("Block_render_", "", $eachfile); + $eachtype = str_replace(".class", "", $eachtype); + $avail_ary[$eachtype] = $i; + $i++; + } + } + + $current_types = $this->getTypes(); + + $this->templ->set_block("listblocktypes", "removerow", "removerows"); + + while( list($key, $val) = each($current_types) ) { + $current_type = $val; + $this->templ->set_var(array( + REMOVENAME => $current_type, + REMOVEURL => $this->psl[phpself] ."?option=delete". $this->psl[amp] ."name=". $current_type + + )); + $this->templ->parse("removerows","removerow",true); + if( isset($avail_ary[$current_type])) { + unset($avail_ary[$current_type]); + + } + + } + $this->templ->set_block("listblocktypes","addrow","rows"); + while( list($key, $val) = each($avail_ary) ) { + + $this->templ->set_var(array( + ADDNAME => $key, + ADDURL => $this->psl[phpself] ."?option=add". $this->psl[amp] ."name=". $key + )); + $this->templ->parse("rows","addrow",true); + + } + + $this->templ->parse(OUT,array("listblocktypes")); + $this->templ->p(OUT); + } elseif ($option == "add") { + $this->putType($name); + $this->listBlockTypes("all"); + } elseif ($option == "delete") { + $this->deleteType($name); + $this->listBlockTypes("all"); + } else { + echo "<A HREF=" . $this->psl[phpself] . "?submit=display" . $this->psl[amp] . "option=all>[Add or Remove Block Types]</A>"; + } + } |