Jump to content

aschulz90

Members
  • Posts

    28
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

aschulz90's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I would make a better randomizer...one that puts preferance on excuses you haven't already read...it's bad to get 2 "My lizards ate my homework" in a row. Also when you select the limit by category button it should stick to that limit for every submit.
  2. Honestly I don't mind the black and red too much but you would probably be better suited to use a gradient for the red (make it look round). You also have some general problems like: -the bar on the bottom is not a consistent width -the links look really weird when you hover over them. I think you should make your background image have curved bottoms, you'd have to look up some css tricks for that but it would be a nice effect.
  3. So I asked Nightslyr via PM what he thought of the site and he went to great lengths to answer the question. I found it so helpful in fact I thought I should regurgitate his reply here: Nightslyr Phpfreaks and it's community rocks!
  4. if you really built it custom than I'd say you'd need some kinda code like this (pretending $article is the object currently being edited) <?php $buttonStart = "<div class=\"readmore\"><a href=\"index.php?option=com_content&view=article&id=".$article->id."&catid=".$article->catid."\">"; $buttonText = "Read More"; $buttonEnd = "</a></div>: echo $buttonStart.$buttonText.$buttonEnd; ?> If your looking to get the itemId, which is important, your going to need much more customization. A link might be helpful, or share some of the relevant code.
  5. I'm a Joomla! guy so I recommend that plus virtue mart...I know theres alot of other options out there though.
  6. I second that question actually. I love php development and making websites functional but I haven't the faintest idea about how to make a site look good.
  7. Thanks so much for so many quick replies..Gotta say this community is much better and more responsive than Joomla! (I'll be sure to look @ your pages if you have any up which need critiquing). responses: Bford21: Sorry about the speed, I'm running this off of my local machine so it's not going to be too snappy with IIS... (Microsoft equivalent to Apache) which for some reason slows down image speed. Most speed issues should be corrected on a real server with apache. radar: Thanks for your awesome response. I already fixed the link isues and yeah there is some kind of photo naming problem going on there..good eye. The odd characters are because I lazily copied something I'll fix that in a few minutes and as for joomla! were hoping that it will provide a way for multiple people to edit content from both the front and back end if you will. I also like that I didn't have to make half the stuff they did initially! Your right though it can be a little bloated. Xcandio: thanks I'll let our "designer" know. and those speed issues were the result of IIS I'm quite sure. Any other responses, in particular about content...like how hard it is to find the recycling schedule for instance?
  8. Please provide Critiques. I used Joomla! 1.5's framework, it has it's problems but version 1.6 is rolling around soon and it looks really good...too bad with all the custom php I did it's going to be impossible to migrate! Site Notes: Most site functionality is there but not all content is up. Please however mention things that are missing, broken or just seem weird. look for things you might have needed to look for on your own municipal site. Thanks for any help. -Adam. http://test.durham.nh.us Note: this site is running on IIS 5.1...which is very slow, the site will launch on Apache. Things worth Mentioning: The major "non-core" components being used are: -a hacked version of com_contact -Jevents (what an awesome component huh?) -JoomDOC (1.5 native version of DOCman) -A custom map program I created using joomla! and the google Maps API (check residents and visitors->At a glance) -A custom town code program I wrote...something I'm quite proud of. -Akeeba Backup. Plug-ins We're using the JoomlaCK Editor A PDF indexer for searching of PDF's A custom plugin which links categories based on their name (so the jevents police department can be associated with the Article category for police department...useful for the modules down the side) Templates Two very similar HIGHLY MODIFIED templates created with an Artisteer base. (pretty solid program) This was my first Joomla! site ever, I've used a Joomla development book and had some programming experience in highschool. This is my second summer working on the site and my boss will hopefully be launching it in a couple months.
  9. Thanks I figured it out right before you told me because it seemed so weird that ones in a folder called dcat were working but others weren't then I realized, the space was the difference.
  10. hi, I'm trying to open "local" files with the following script. I'm trying to access the files remotely though and this script works up until the file get contents portion. now file_get_contents() itself is working, it will take the homepage and other remote pages but for some reason this page: http://ci.durham.nh.us/government/Agendas/historic district commission/2009/hist06042009.html and others like it won't work? I don't know what the problem is but I have a feeling it has to do with IIS. Could permissions be affecting this? <?php function get_tables() { $host="xx.x.xx.xxx"; $user="xxxx"; $password="xxxx"; mysql_connect($host,$user,$password); mysql_select_db("agendas"); $rows = mysql_query("SHOW TABLES"); while ($row = mysql_fetch_array($rows)) { $group = $row[0]; if ($group != "users") { echo "<h2><u>".$group."</u></h2><br>"; listsend($group); } } } function listsend($group) { $query = "SELECT * FROM `".$group."`"; $result = mysql_query($query); for ($i = 0; $i < mysql_num_rows($result); $i++) { $row = mysql_fetch_row($result); $upload = $row[0]; $date = $row[1]; $Location = $row[2]; $docloc = $row[3]; $Time = $row[4]; uploader($upload, $date, $Location, $docloc, $Time); } } function uploader($upload, $date, $Location, $docloca, $Time) { $FileName = "http://ci.durham.nh.us/government/".$docloca; echo $FileName."<br>"; $ev_id= mysql_insert_id(); $icsid="1"; //******SEE IF FILE EXISTS, GET CONTENTS********// if (file_exists($FileName)) { $description= file_get_contents($FileName); echo $description."<br>"; } else { echo "ERROR<br>"; } //*******************END IF********************// //...MORE MYSQL dAtABASE INSERTING SCRIPT... } get_tables(); ?>
  11. Sorry about that, will do. The code above was only the short version. Here is it finalized for use to migrate html documents to Joomla!'s article database: <?php //Initializers... //error_reporting(E_ALL); //ini_set('display_errors', '1'); //Copyright Adam Schulz 2009 $host="xx"; $user="xx"; $password="xx"; $errors=""; $_SESSION["knowdis"]="0"; mysql_connect($host,$user,$password); /*******This Function uploads the Document to the MySQL Database*******/ function Uploader() { if (($_FILES["file"]["type"] == "text/html") && ($_FILES["file"]["size"] < 1000000)) { if ($_FILES["file"]["error"] > 0){ echo "Return Code: " . $_FILES["file"]["error"] . "<br />"; } else { $FileName = $_FILES["file"]["name"]; $tmpName = $_FILES["file"]["tmp_name"]; $id= mysql_insert_id(); $title = "Friday Updates"; $alias = ""; $title_alias = ""; $introtext = ""; $fulltext = file_get_contents($tmpName); $state = "1"; $sectionid = "1"; $mask = "0"; $catid = "1"; //******************NAMING SCRIPT: *****************// $month = substr($FileName,0,2); $day = substr($FileName,2,2); $year = substr($FileName,4,2); $created = "20".$year."-".$month."-".$day." 17:00:00"; echo $created; //****************** END NAMING SCRIPT: *****************// $created_by = "62"; $created_by_alias = "xx"; $modified = date( 'Y-m-d H:i:s'); $modified_by = "62"; $checked_out = "62"; $checked_out_time = "0000-00-00 00:00:0000"; $publish_up = $modified; $publish_down = $checked_out_time; $images = "0"; $urls = "0"; $attribs = "show_title=1 link_titles=0 show_intro=1 show_section= link_section= show_category= link_category= show_vote= show_author=1 show_create_date=1 show_modify_date=0"; $version="1"; $parentid = "0"; $ordering = "0"; $metakey = ""; $metadesc = ""; $access = "0"; $hits = "0"; $metadata = "robots= author="; $mysql_link = @mysql_connect("xx", "xx", "xx"); if (mysql_errno() == 0) { @mysql_select_db("joomla", $mysql_link);} $sqlcmd = sprintf("INSERT INTO `jos_content`(`id`, `title`, `alias`, `title_alias`, `introtext`, `fulltext`, `state`, `sectionid`, `mask`, `catid`, `created`, `created_by`, `created_by_alias`, `modified`, `modified_by`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `images`, `urls`, `attribs`, `version`, `parentid`, `ordering`, `metakey`, `metadesc`, `access`, `hits`, `metadata`) VALUES('%s', '%s', '%s', '%s', '%s','%s', '%s', '%s', '%s', '%s', '%s','%s', '%s', '%s', '%s', '%s', '%s','%s', '%s', '%s', '%s', '%s', '%s','%s','%s', '%s', '%s', '%s','%s','%s')", mysql_real_escape_string($id, $mysql_link), mysql_real_escape_string($title, $mysql_link), mysql_real_escape_string($alias, $mysql_link), mysql_real_escape_string($title_alias, $mysql_link), mysql_real_escape_string($introtext, $mysql_link), mysql_real_escape_string($fulltext, $mysql_link), mysql_real_escape_string($state, $mysql_link), mysql_real_escape_string($sectionid, $mysql_link), mysql_real_escape_string($mask, $mysql_link), mysql_real_escape_string($catid, $mysql_link), mysql_real_escape_string($created, $mysql_link), mysql_real_escape_string($created_by, $mysql_link), mysql_real_escape_string($created_by_alias, $mysql_link), mysql_real_escape_string($modified, $mysql_link), mysql_real_escape_string($modified_by, $mysql_link), mysql_real_escape_string($checked_out, $mysql_link), mysql_real_escape_string($checked_out_time, $mysql_link), mysql_real_escape_string($publish_up, $mysql_link), mysql_real_escape_string($publish_down, $mysql_link), mysql_real_escape_string($images, $mysql_link), mysql_real_escape_string($urls, $mysql_link), mysql_real_escape_string($attribs, $mysql_link), mysql_real_escape_string($version, $mysql_link), mysql_real_escape_string($parentid, $mysql_link), mysql_real_escape_string($ordering, $mysql_link), mysql_real_escape_string($metakey, $mysql_link), mysql_real_escape_string($metadesc, $mysql_link), mysql_real_escape_string($access, $mysql_link), mysql_real_escape_string($hits, $mysql_link), mysql_real_escape_string($metadata, $mysql_link)); @mysql_query($sqlcmd, $mysql_link); if (mysql_errno() > 0) { echo 'MySQL error # ' . mysql_errno() . ' : ' . mysql_error() . '<br>'; exit;} } } else { echo "<font color=\"#FF0000\">An Error Occurred! The file is either of the wrong type, too large, or is in use.<br>Remember to close out of your word processesor after saving!</font>"; } } //**********************END OF FUNCTION*******************************// if ($_FILES["file"]=="") { $first="1"; } else { $first="0"; } ?> <title>Friday Updates Migrator</title><body link="#0000FF" vlink="#0000CC" alink="#0066FF"> <h2>Friday Updates Migrator V1.0</h2> <br> <form action="" method="post" enctype="multipart/form-data"> <br> <br>HTML File Location:<br> <input type="file" name="file" id="file" value="<?php echo($_FILES["file"]); ?>"/><br> <input type="Submit" name="Submit" value="Submit" > </form> <?php if (($first == 0)){uploader();} ?>
  12. This case is resolved! I don't know why I wanted to upload the file as binary that was dumb. Here's the new code and you change the bin_data to some other kind of lengthly text feild. <?php //Initializers... //error_reporting(E_ALL); //ini_set('display_errors', '1'); $errors=""; $_SESSION["knowdis"]="0"; mysql_connect($host,$user,$password); /* This Function uploads the Document to the Web Server...OR SHOULD!!! */ function Uploader() { if (($_FILES["file"]["type"] == "text/html") && ($_FILES["file"]["size"] < 1000000)) { if ($_FILES["file"]["error"] > 0){ echo "Return Code: " . $_FILES["file"]["error"] . "<br />"; } else { $file = $_FILES["file"]; $date = $_POST["description"]; $fileName = $_FILES["file"]["name"]; $tmpName = $_FILES["file"]["tmp_name"]; $fileSize = $_FILES["file"]["size"]; $fileType = $_FILES["file"]["type"]; $id= mysql_insert_id(); $data = file_get_contents($tmpName); echo($fileSize); echo($data); $mysql_link = @mysql_connect("xx","xx","xx"); if (mysql_errno() == 0) { @mysql_select_db("xx", $mysql_link);} $sqlcmd = sprintf("INSERT INTO `binary_data`(`id`, `description`, `bin_data`, `filename`, `filesize`, `filetype`) VALUES('%s', '%s', '".$data."', '%s', '%s', '%s')", mysql_real_escape_string($id, $mysql_link), mysql_real_escape_string($date, $mysql_link), //mysql_real_escape_string($data, $mysql_link), mysql_real_escape_string($fileName, $mysql_link), mysql_real_escape_string($fileSize, $mysql_link), mysql_real_escape_string($fileType, $mysql_link)); @mysql_query($sqlcmd, $mysql_link); if (mysql_errno() > 0) { echo 'MySQL error # ' . mysql_errno() . ' : ' . mysql_error() . '<br>'; exit;} } } else { echo "<font color=\"#FF0000\">An Error Occurred! The file is either of the wrong type, too large, or is in use.<br>Remember to close out of your word processesor after saving!</font>"; } } //**********************END FUNCTION*******************************// if (($_POST["description"]=="")) { $first="1"; } else { $first="0"; } ?> <title>Bianary File Uploader</title><body link="#0000FF" vlink="#0000CC" alink="#0066FF"> <br> <form action="" method="post" enctype="multipart/form-data"> <br> <label>File Description:</label><br> <input name="description" id="description" value="<?php echo($_POST["description"]); ?>"> <br>HTML File Location:<br> <input type="file" name="file" id="file" value="<?php echo($_FILES["file"]); ?>"/><br> <input type="Submit" name="Submit" value="Submit" > </form> <?php if (($first == 0)){Uploader();} ?>
  13. When I try and get the following code to work (it's mostly my own coding actually not third party) the binary file in the table won't work! it says resource id #3 and is only 14bytes which is not the size of the html document I'm uploading here is a link to the php script in a text file: http://ci.durham.nh.us/brokenbinary.txt here is the query creation command for the table: CREATE TABLE binary_data ( id INT(4) NOT NULL AUTO_INCREMENT PRIMARY KEY, description CHAR(50), bin_data LONGBLOB, filename CHAR(50), filesize CHAR(50), filetype CHAR(50) ); (That code was written by an author from phpbuilder.com) the original code is there but I couldn't get it to work as it was I'm thinking because it was PHP3. I've been working at this all day and can't figure out why this just won't work. Thanks for any help.
  14. as the title says I have looked everywhere on Google and found Many results. But most scripts have just failed. The first I tried was this: http://www.wynia.org/wordpress/word-to-pdf-converter-in-php-word2pdf/ that looked promising but I could not manage to stop errors which basically said "access denied" even after trying to set permissions. Can anyone please direct me to a free or relatively inexpensive AUTOMATIC program (or a script I could integrate into php) which will convert .doc to .html and .doc to .pdf? I tried to install POI scratch pad but I don't really know how to install it let alone use the library. I really am in need of a solution, and one within the next 2 weeks. Thanks for any help.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.