Welcome, Register for free! or Login below:
EduGeek.net RSS Feeds Register FAQ Members Social Groups User Map Calendar Search Today's Posts Mark Forums Read

EduGeek Joomla 1.5 Package Next generation joomla with our favourite edugeek templates.

Go Back   EduGeek.net Forums > EduGeek Projects > Projects: > EduGeek Joomla 1.5 Package
Reply
 
LinkBack Thread Tools Search Thread
Sponsored Links
Old 26-05-2008, 11:54 AM   #1
 
SimpleSi's Avatar
 
Join Date: Jun 2005
Location: Lancashire
Posts: 1,895
uk
Thanks: 137
Thanked 97 Times in 81 Posts
Rep Power: 28 SimpleSi is a glorious beacon of lightSimpleSi is a glorious beacon of lightSimpleSi is a glorious beacon of lightSimpleSi is a glorious beacon of lightSimpleSi is a glorious beacon of light
Default New approach needed for school newsletters

On all my non-EGJP sites, (all primaries BTW) I've employed a simple system of publishing the weekly newsletter.

Head/School Sec writes it (in Word or Publisher) and then converts it to PDF (using a virtual PDF printer) into a folder

On static sites, they run DirHTML which produces a list of all PDFs and then they FTP the html file list and the most recent PDF up to the website.

http://www.whitefield-pri.lancs.sch....ewsletters.htm
[edit]url corrected[/edit]

On my CMSimple sites they just have to upload the PDF and I've a modified small PHP script that autogenerates the webpage with the PDFs linked on it

Euxton CE Primary School - Newsletters

Now, I could modify the CMSimple script and turn it into a joomla module but I'm wondering whether there is a better "joomla way" of achieving the end result - easy access to current and past newsletters for the parents and easy for Head/Sec to get them online, via normal joomla editing rather than using FTP?
????: EduGeek.net Forums http://www.edugeek.net/forums/edugeek-joomla-1-5-package/19950-new-approach-needed-school-newsletters.html

What methods is everyone else using?

regards

Simon
  Reply With Quote
The Following User Says Thank You to SimpleSi For This Useful Post:
speckytecky (26-05-2008)
Old 26-05-2008, 12:12 PM   #2
 
imullings's Avatar
 
Join Date: May 2006
Location: Devizes
Posts: 25
uk
Thanks: 0
Thanked 4 Times in 3 Posts
Rep Power: 7 imullings is on a distinguished road
Default

We are just setting up a new archive using docman in Joomla.
http://www.devizesschool.co.uk/news-...archives-4.htm
We are also setting up a mailing list to point to the PDFs
This is still in testing so is on a test site only
http://testsite.devizesschool.co.uk/news/
Both are work in progress but are looking good

Ian Mullings
Devizes SChool IT Support
  Reply With Quote
The Following 2 Users Say Thank You to imullings For This Useful Post:
SimpleSi (26-05-2008), speckytecky (26-05-2008)
Old 29-05-2008, 05:35 PM   #3
 
ninja-lewis's Avatar
 
Join Date: May 2007
Posts: 12
uk
Thanks: 1
Thanked 1 Time in 1 Post
Rep Power: 0 ninja-lewis is an unknown quantity at this point
Default

SimpleSi, could you share the php script you use on the CMSimple sites to autogenerate the list of newsletters? I'm using CMS Made Simple and would like to do this too but there isn't an extension for CMSMS to do this yet.

I'm not familiar with Joomla but CMS Made Simple allows editors to upload images and files from within the normal editing area, using file and image upload managers. I'd expect Joomla to have the same. It could be possible to use these to upload the PDFs to the specified folder and then just use your existing script to display the contents of that folder - I can't see any reason why your script would care how the files reached the folder it's watching.

Lewis
  Reply With Quote
Old 01-06-2008, 11:54 AM   #4
 
SimpleSi's Avatar
 
Join Date: Jun 2005
Location: Lancashire
Posts: 1,895
uk
Thanks: 137
Thanked 97 Times in 81 Posts
Rep Power: 28 SimpleSi is a glorious beacon of lightSimpleSi is a glorious beacon of lightSimpleSi is a glorious beacon of lightSimpleSi is a glorious beacon of lightSimpleSi is a glorious beacon of light
Default

@Lewis
Here is the code to give a file listing using CMSimple

The original code took a path and produce a nice file listing with icons.
I modified it to only display items with a certain prefix (so I could reuse it on differnet pages - one for news one for policies etc)
And I also added a parameter to do a sort e.g DD - date descending, (latest newsletter first on list) also does size of file e.g SD - size in descending order.

Code:
<?

/*

CMSimple WDir plugin
© 2006 - Joachim Barthel - www.qualifire.de/cmsimple/en
---------------------------------------------------------------------
Disclaimer:   No warranties at all, use on your own risk !
---------------------------------------------------------------------
Requirements: - CMSimple 2.5 is installed and running.
              - The plugin loader from cmsimpleplugins.svarrer.dk 
                is installed and working !
---------------------------------------------------------------------
Feedback to:  jbarthel@qualifire.de
---------------------------------------------------------------------

Version 0.1 beta 1  (03. June 2006)
  - Support for multilingual use
  - Enhancements of display
  - first options

Version 0.1 beta 1a  (04. June 2006)
  - Help files (en & de)
  - new option for summary

Version 0.1 beta 2 (03. July 2006)
  - Slovak language support (Thanks to Martin Sereday)
  - Display of file attributes
  - Error trapping of wrong path
  - Formatting with CSS
  - Error on counting the files

Version 0.1 beta 2a (26. July 2006)
  - Option for hidden files (starting with dot-character)

Version 0.1 beta 3 (03. September 2006)
  - Show/Hide option for Size and Date columns
  - Open mode added

Version modified by Simon Walters (SimpleSi) mod 1 28th April 2007
 - Only display files starting with 2nd parameter
 - Sort into Reverse Date Order

Version modified by Simon Walters (SimpleSi) mod 2 29th Nov 2007
 - Only display files size in k
 - Display date in dd/mm/yyyy format

  
*/



function wd_Version() {
   return "0.3sw2 beta";
}

//
// simplesi change - 2 extra parameters added
//
function wd_list($wd_PathParam,$simplesi_FilePrefix,$simplesi_Sort) {

	GLOBAL $su, $sl, $plugin_cf, $plugin_tx, $pth, $plugin;

	//$wd_version = "0.1 beta 2a ";
	error_reporting(E_ALL);

	$wdo = "";
	$wdo .= "<!-- QualiFIREs WebDirectory >>WDir<< Code starts here -->\n<div><br>\n";

	if (substr($wd_PathParam,-1,1) <> "/") $wd_PathParam .= "/";
	if (($wd_PathParam == "./") || ($wd_PathParam == "/")) $wd_PathParam = "";
	if (substr($wd_PathParam,0,2) == "./") $wd_PathParam = substr($wd_PathParam,2);
	$wd_path = $pth['folder']['base'] . $wd_PathParam;
	if(eregi("true",$plugin_cf['wdir']['debug'])) {
		$wdo .= "Path-Parameter: $wd_PathParam<br>";
		$wdo .= "Fileserver-Dir: $wd_path<br>";
		$wdo .= "HTTP_HOST: " . $_SERVER['HTTP_HOST'] . "<br>";
		$wdo .= "PHP_SELF: " . $_SERVER['PHP_SELF'] . "<br>";
		$wdo .= "<hr>";
	}
	$d = dir($wd_path);

	$wd_fnames = array();
	$wd_ftypes = array();

//
// simplesi change - 2 extra arrays added
//
	$simplesi_dates = array();
	$simplesi_sizes = array();


	$fcount = 0;
	while (false !== ($entry = $d->read())) {
		if ($entry != "." && $entry != "..") {
			if ((eregi("true",$plugin_cf['wdir']['show_hiddenfiles'])) || (substr($entry,0,1) != '.')) {

//
// simplesi change - check if file prefix param is used
//
				if (($simplesi_FilePrefix == "") || (substr(strtolower($entry),0,strlen($simplesi_FilePrefix)) == strtolower($simplesi_FilePrefix))) {

					$fcount++;
					array_push($wd_fnames, $entry);
					array_push($wd_ftypes, filetype($wd_path."/".$entry));
//
// simplesi change - insert filetime and filesize into new arrays
//
					array_push($simplesi_dates, filemtime($wd_path."/".$entry));
					array_push($simplesi_sizes, filesize($wd_path."/".$entry));

				}
			}
		}
	}
	$d->close();
	$fcount--;

	$wd_lowfnames = array_map('strtolower', $wd_fnames);

//
// simplesi change - change file sort order if needed
//
	$simplesi_Sort = $simplesi_Sort . "  ";
	if (substr(strtolower($simplesi_Sort),0,1) == "d") {
		if (substr(strtolower($simplesi_Sort),0,2) == "dd") {
			array_multisort($simplesi_dates,SORT_DESC,$wd_ftypes, $wd_lowfnames, $wd_fnames);
		}
		else {
			array_multisort($simplesi_dates,SORT_ASC,$wd_ftypes, $wd_lowfnames, $wd_fnames);
		}
	}
	elseif (substr(strtolower($simplesi_Sort),0,1) == "s") {
		if (substr(strtolower($simplesi_Sort),0,2) == "sd") {
			array_multisort($simplesi_sizes,SORT_DESC,$wd_ftypes, $wd_lowfnames, $wd_fnames);
		}
		else {
			array_multisort($simplesi_sizes,SORT_ASC,$wd_ftypes, $wd_lowfnames, $wd_fnames);
		}
	}

	elseif ($simplesi_Sort == "  ") {
		array_multisort($wd_ftypes, $wd_lowfnames, $wd_fnames);
	}


	$wd_http = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
	$wd_http = substr($wd_http,0,strrpos($wd_http,'/')+1);
	if (substr($wd_http,-4,4) == '/'.$sl.'/') $wd_http = substr($wd_http,0,strlen($wd_http)-3);
   
   if(eregi("true",$plugin_cf['wdir']['show_path'])) {
     $wdo .=  "<span class=\"wdPath\">"
        . "&nbsp;Path: <strong>" . $wd_http.$wd_PathParam. "&nbsp;</strong>"
        . "</span><br /> <br>\n";
   }
        
	$wdo .= "<table>";
	if(eregi("true",$plugin_cf['wdir']['show_colheader'])) {
		$wdo .= "<tr>";
		$wdo .= "<td colspan=\"3\" class=\"wdColHeader\">" . $plugin_tx['wdir']['txt_name'] . "</td>";
		if(eregi("true",$plugin_cf['wdir']['show_size'])) 
			$wdo .= "<td colspan=\"3\" class=\"wdColHeader\">" . $plugin_tx['wdir']['txt_size'] . "</td>";
			
		if(eregi("true",$plugin_cf['wdir']['show_changed'])) 
			$wdo .= "<td class=\"wdColHeader\">" . $plugin_tx['wdir']['txt_changed'] . "</td>";
			
		if(eregi("true",$plugin_cf['wdir']['show_attributes'])) 
			$wdo .= "<td colspan=\"2\" class=\"wdColHeader\">" . $plugin_tx['wdir']['txt_perms'] . "</td>";
		
		$wdo .= "</tr>";
	}
   
   $wd_total = 0;
   for ($i = 0; $i <= $fcount; $i++) {
      $wd_fext = substr($wd_fnames[$i],strrpos($wd_fnames[$i],".")+1);
      //if (filetype($fullname) == "dir") $wd_fext = "DIR";
      $fullname = $wd_path . "/" . $wd_fnames[$i];
      if (filetype($fullname) == "dir") {
         /*
         $wdo .= "<tr>";
         $wd_fext = "DIR";
         $wdo .= "<td><img src=\"" . wd_FileIcon($wd_fext) . "\"></td><td></td>";
         $wdo .= "<td>". $wd_fnames[$i] . "</td><td>&nbsp;&nbsp;</td>";
         $wdo .= "<td></td><td>&nbsp;&nbsp;</td>";
         //$wdo .= "<td>Dateiordner</td><td>&nbsp;&nbsp;</td>";
         $wdo .= "<td>" . date("d.m.Y H:i:s", filemtime($fullname)) . "</td>";
         $wdo .= "</tr>\n";
         */
      } else {
         $wdo .= "<tr>";
         $wdo .= "<td><img src=\"" . wd_FileIcon($wd_fext) . "\"></td><td></td>";
         $wdo .= "<td><a href=\"" .$wd_http . $wd_PathParam .$wd_fnames[$i]. "\" target=\"" . $plugin_cf['wdir']['open_mode'] . "\">". $wd_fnames[$i] . "</a></td>";
         if(eregi("true",$plugin_cf['wdir']['show_size'])) 
         	$wdo .= "<td>&nbsp;&nbsp;</td><td align=\"right\">". number_format(filesize($fullname)/1024,0,',','.') . " KBytes</td><td>&nbsp;&nbsp;</td>";
         	
         $wd_total += filesize($fullname);
         //$wdo .= "<td>".strtoupper($wd_fext)."-Datei</td><td>&nbsp;&nbsp;</td>";
         if(eregi("true",$plugin_cf['wdir']['show_changed'])) 
         	$wdo .= "<td>" . date("d/m/Y", filemtime($fullname)) . "</td>";
         	
         if(eregi("true",$plugin_cf['wdir']['show_attributes'])) {
            //$wdo .= "<td></td><td>".decoct(fileperms($fullname))."</td>";
            $wdo .= "<td></td><td>".wd_FilePerms(decoct(fileperms($fullname)))."</td>";
         }
         
         $wdo .= "</tr>\n";
      }
   }
   $wdo .= "</table><br>";
   if(eregi("true",$plugin_cf['wdir']['show_summary'])) {
     $fcount++;
     $wdo .=  "<span class=\"wdSummary\">"
        . "&nbsp;" . $fcount . "&nbsp;" . $plugin_tx['wdir']['txt_files'] . ",&nbsp;" . number_format($wd_total,0,',','.') . "&nbsp;Bytes"
        . "</span><br /> <br>\n";
   }

   if(eregi("true",$plugin_cf['wdir']['show_creator'])) {
      $wdo .= "<div style=\"text-align: center; font-size: 0.75em; display: block\">";
   } else {
      $wdo .= "<div style=\"text-align: center; font-size: 0.75em; display: none\">";
   }
   $wdo .= "<br>&nbsp;<br><span style=\"border-top: 1px solid; padding-top: 2px; color:#666666;\">&nbsp;&nbsp;&nbsp;Webdirectory plugin, Ver. " . wd_version() . " by <a href=\"http://www.qualifire.de/cmsimple\" target=\"_blank\">QualiFIRE</a>&nbsp;&nbsp;&nbsp;</span>";
   $wdo .= "</div>";

   $wdo .= "<br></div>";
   $wdo .= "\n<!-- QualiFIREs WebDirectory >>WDir<< Code ends here -->\n";
   
   return $wdo;
}



function wd_FileIcon($wd_fext) {

	GLOBAL $su, $sl, $plugin_cf, $plugin_tx, $pth, $plugin;

	$wd_FullPath = $pth['folder']['plugins']."wdir/images/" . strtoupper($wd_fext) . "icon.gif";
	if (!file_exists($wd_FullPath)) $wd_FullPath = $pth['folder']['plugins']."wdir/images/" . "UFO" . "icon.gif";
  
	return $wd_FullPath;

}


function wd_FilePerms($fperms) {
	$cRet = "<table><tr>";
	for ($i=3; $i<=5; $i++) {
		$cOctAcc = intval(substr($fperms,$i,1));
		if ($cOctAcc-4 >= 0) {
			$cOctAcc -= 4;
			$cChrAcc = "<td class=\"wdFilePerms\">R</td>";
		} else {
			$cChrAcc = "<td class=\"wdFilePerms\">-</td>";
		}
		if ($cOctAcc-2 >= 0) {
			$cOctAcc -= 2;
			$cChrAcc .= "<td class=\"wdFilePerms\">W</td>";
		} else {
			$cChrAcc .= "<td class=\"wdFilePerms\">-</td>";
		}
		if ($cOctAcc == 1) {
			//$cOctAcc -= 2;
			$cChrAcc .= "<td class=\"wdFilePerms\">X</td>";
		} else {
			$cChrAcc .= "<td class=\"wdFilePerms\">-</td>";
		}
		
		$cRet .= $cChrAcc;
		$cRet .= "<td>&nbsp;</td>";
	}
	$cRet .= "</tr></table>";
	return $cRet;
}



?>
  Reply With Quote
The Following User Says Thank You to SimpleSi For This Useful Post:
ninja-lewis (02-06-2008)
Old 03-06-2008, 06:07 AM   #5
 
alonebfg's Avatar
 
Join Date: Aug 2006
Location: south west some of the time
Posts: 788
uk uk devon
Thanks: 9
Thanked 29 Times in 16 Posts
Blog Entries: 4
Rep Power: 11 alonebfg will become famous soon enoughalonebfg will become famous soon enough
Send a message via MSN to alonebfg
Default

there is a module in docman that will do that for you in joomla.
  Reply With Quote
Reply
Similar Threads
Thread Thread Starter Forum Replies Last Post
school server support contract needed z4ydi Network and Classroom Management 12 03-03-2008 09:11 AM
Microsoft School Agreement Help Needed. ICTNUT Educational Software 4 12-06-2007 04:00 PM
Sending HTML Newsletters Simcfc73 Web Development 13 01-03-2007 02:27 PM
Creating Newsletters (and general DTP-type stuff) Ric_ General Chat 6 12-05-2006 08:19 AM



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search Thread
Search Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:05 AM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 ©2009, Crawlability, Inc.
Copyright EduGeek.net




website uptime

© 2005 - 2009 EduGeek.net
no new posts