[SUCS Devel] site r645 - in branches/sucs-site: components htdocs/css lib static/Community templates

imranh at sucs.org imranh at sucs.org
Mon Mar 2 12:16:07 GMT 2015


Author: imranh
Date: 2015-03-02 12:16:02 +0000 (Mon, 02 Mar 2015)
New Revision: 645

Removed:
   branches/sucs-site/components/forum.php
   branches/sucs-site/components/forumposts.php
   branches/sucs-site/htdocs/css/forum/
   branches/sucs-site/lib/punbb/
   branches/sucs-site/static/Community/Forum.txt
   branches/sucs-site/templates/forumposts.tpl
Log:
Kill the forum

Deleted: branches/sucs-site/components/forum.php
===================================================================
--- branches/sucs-site/components/forum.php	2015-02-02 10:55:23 UTC (rev 644)
+++ branches/sucs-site/components/forum.php	2015-03-02 12:16:02 UTC (rev 645)
@@ -1,64 +0,0 @@
-<?php
-
-// Forum integration component
-
-$punbb_base = "$base/lib/punbb";
-
-// Attempt to divine which punbb file is wanted
-$file_index = array_search("Forum", $pathlist) + 1;
-
-if ($pathlist[$file_index] == "") {
-        $punbb_file = "index.php";
-} else {
-        $punbb_file = $pathlist[$file_index];
-}
-
-// Stick relevant get parameters somewhere where the template can get them
-// This is to cure problems with the login form eating essential get params
-// Done here instead of site-wide to limit potential for an XSS vulnerabilityy
-
-// (it occurs though that this could be solved using session data rather than writing GET params)
-
-$gets = array();
-if (isset($_GET['id']))
-	$gets['id'] = intval($_GET['id']);
-if (isset($_GET['p']))
-	$gets['p'] = intval($_GET['p']);
-
-$smarty->assign("gets", $gets);
-
-
-// move to the punbb directory and start buffering
-$oldcwd = getcwd();
-chdir($punbb_base);
-ob_start();
-
-// include the wanted punbb file
-try {
-	include($punbb_base."/".$punbb_file);
-} catch (Exception $e) {
-	// do nothing. This is practically expected as our punbb throws exceptions when it's done rendering
-	// this sounds nasty, but it's better than calling exit() like the stock punbb does ;-)
-}
-
-// stop buffering, move back to where we were
-$page = ob_get_contents();
-ob_clean();
-chdir($oldcwd);
-
-// if this is for syndication purposes or the punbb installer, we don't want a template 
-if ($punbb_file == "extern.php" || $punbb_file == "install.php") {
-	$no_template = TRUE;
-	echo $page;	
-} else {
-
-	// make the breadcrumbs tastier
-	$pathlist = array_slice($pathlist, 0, $file_index);
-
-	$smarty->assign("title", "Forum");
-	$smarty->assign("extra_styles", "$baseurl/css/forum/SUCS.css");
-	$smarty->assign("rss_url", "/Community/Forum/extern.php?action=active&type=rss");
-	$smarty->assign("body", $page);
-}
-
-?>

Deleted: branches/sucs-site/components/forumposts.php
===================================================================
--- branches/sucs-site/components/forumposts.php	2015-02-02 10:55:23 UTC (rev 644)
+++ branches/sucs-site/components/forumposts.php	2015-03-02 12:16:02 UTC (rev 645)
@@ -1,14 +0,0 @@
-<?php
-unset($result);
-//require_once("/usr/share/adodb/adodb.inc.php");
-require_once("/usr/share/php/adodb/adodb.inc.php");
-$ForumDB = NewADOConnection('postgres8');
-$ForumDB->Connect('dbname=punbb user=apache');
-$ForumDB->SetFetchMode(ADODB_FETCH_ASSOC);
-
-$posts = $ForumDB->GetAll('SELECT t.subject, t.last_poster, t.last_post_id FROM topics AS t INNER JOIN forums AS f ON f.id=t.forum_id LEFT JOIN forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=4) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) ORDER BY t.last_post DESC LIMIT 5');
-
-$smarty->assign('posts', $posts);
-
-$result = $smarty->fetch('forumposts.tpl');
-?>

Deleted: branches/sucs-site/static/Community/Forum.txt
===================================================================
--- branches/sucs-site/static/Community/Forum.txt	2015-02-02 10:55:23 UTC (rev 644)
+++ branches/sucs-site/static/Community/Forum.txt	2015-03-02 12:16:02 UTC (rev 645)
@@ -1 +0,0 @@
-<p>Due to technical problems, the SUCS forum is currently unavailable. We hope to have this fixed within the next couple of days.</p><p>- SUCS Admin, 2006-12-07<br /></p>
\ No newline at end of file

Deleted: branches/sucs-site/templates/forumposts.tpl
===================================================================
--- branches/sucs-site/templates/forumposts.tpl	2015-02-02 10:55:23 UTC (rev 644)
+++ branches/sucs-site/templates/forumposts.tpl	2015-03-02 12:16:02 UTC (rev 645)
@@ -1,23 +0,0 @@
-{if count($posts) > 0 }
-<div class="cbb">
-
-<h3>Recent Forum posts</h3>
-<p>Looking for something?</p>
-<p>We are looking to remove the forum component of the site</p>
-<p>If you have an opinion on this change contact: staff at sucs.org</p>
-{*
-<table width="100%" class="border">
-<tr>
-<th>Subject</th>
-<th>by</th>
-</tr>
-{foreach name=posts from=$posts item=post}
-<tr>
-	<td><a href="/Community/Forum/viewtopic.php?pid={$post.last_post_id}#p{$post.last_post_id}">{$post.subject}</a></td>
-	<td><a href="/Community/Members/{$post.last_poster}">{$post.last_poster}</a></td>
-</tr>
-{/foreach}
-</table>
-*}
-</div>
-{/if}




More information about the Devel mailing list