Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

digitalpencil

Members
  • Joined

  • Last visited

  1. That's great guys, yeah it was the period proceeding the $filename var. Coming out full colour now. Thanks!
  2. Hi, I've got the following script which grabs an image uploaded through Flash, stores on the server and generates a thumbnail. I'm using GD imagecopyresize to generate the thumbnails which is working fine except that the resized result always comes out black? Any ideas why this could be? <?php // Set local PHP vars from the POST vars sent from flash $todayDate = $_POST['todayDate']; $Name = $_POST['Name']; $Email = $_POST['Email']; $filename = $_FILES['Filedata']['name']; $filetmpname = $_FILES['Filedata']['tmp_name']; $fileType = $_FILES["Filedata"]["type"]; $fileSizeMB = ($_FILES["Filedata"]["size"] / 1024 / 1000); // Place file on server, into uploadimages move_uploaded_file($_FILES['Filedata']['tmp_name'], "uploadimages/".$filename); // Logfile $myFile = "logFile.txt"; $fh = fopen($myFile, 'a') or die("can't open file"); $stringData = "\n\ntodayDate: $todayDate \n Name: $Name \n Email: $Email \n ssid: $ssid \n FileName: $filename \n TmpName: $filetmpname \n Type: $fileType \n Size: $fileSizeMB MegaBytes"; fwrite($fh, $stringData); fclose($fh); // End log file edit // load image and get image size $img = imagecreatefromjpeg( "uploadimages/.$filename" ); $width = imagesx( $img ); $height = imagesy( $img ); // set thumbnail size $new_width = 100; $new_height = 100; // create a new tempopary image $tmp_img = imagecreatetruecolor( $new_width, $new_height ); // copy and resize old image into new image imagecopyresized( $tmp_img, $img, 0, 0, 0, 0, $new_width, $new_height, $width, $height ); // save thumbnail into a new file in uploadthumbs imagejpeg( $tmp_img, "uploadthumbs/$filename" ); ?>
  3. I've got the following table i'm rendering from data drawn from MySQL. http://s46264.gridserver.com/apps/faithless/faithless-cms.php I've drawn out the table sections, echoed back the relevant data in each row and have appended a checkbox to each. The idea is really straight forward, it's basically a table of the database contents that will serve as a moderation system. When the user checks the relevant boxes for each record and hits a submit button (that i'll put at the bottom of the table), it will update the 'approved' field for each record checked, from '0' to '1'. So basically, how can i use the following checkboxes to set the approved field to '1' for each record displayed? Thanks. My code: <html><head><title>Faithless CMS</title></head><body> <?php $db_host = ''; $db_user = ''; $db_pwd = ''; $database = ''; $table = 'faithlesscomm'; if (!mysql_connect($db_host, $db_user, $db_pwd)) die("Can't connect to database"); if (!mysql_select_db($database)) die("Can't select database"); // sending query $result = mysql_query("SELECT name, comment FROM {$table}"); if (!$result) { die("Query to show fields from table failed"); } $fields_num = mysql_num_fields($result); echo "<h1>Table: {$table}</h1>"; echo "<table border='1'><tr>"; // printing table headers for($i=0; $i<$fields_num; $i++) { $field = mysql_fetch_field($result); echo "<td>{$field->name}</td>"; } echo "<td>Approved</td>"; echo "</tr>\n"; // printing table rows while($row = mysql_fetch_row($result)) { echo "<tr>"; // $row is array... foreach( .. ) puts every element // of $row to $cell variable foreach($row as $cell) echo "<td>$cell</td>"; echo "<td><input type='checkbox' name='ckbx1' value='$id'></td>"; echo "</tr>\n"; } mysql_free_result($result); ?> </body></html>
  4. Thanks guys, i'm using adjacency list and formatting as XML which is working great
  5. It only has to go one comment deep. So you have a lead comment and a bunch of sub comments, nothing fancy and as straight forward as possible.
  6. General advice for this one. I'm pretty new to PHP MySQL but am building a comment system where in a user can submit a comment and have this echoed back. I've got all this working which is great but I'd like to add subcomments as well so other users can reply to a comment. Right now i've got one table with id (primary key), name, post_date, comment and location. To have subcomments or replies i imagine i'd have to create a new table for replies and tie these two tables together. My question is broad but how would i tie a reply to a lead comment? Thanks
  7. Thanks again for the info. Just had a quick look at ExpressionEngine and that looks like a well-rounded solution i'll have to look into further. I'm thinking of Drupal, either that or just doing the main site in WP and then offloading the Flash asset management to a custom CMS, outside of WP. Not ideal but given it's only two Flash elements, it's not the end of the world if they sit on a different CMS. Cheers, Dave
  8. thanks. the more i read into it, the less i'm thinking wordpress is the right CMS for this job. i gather you really need to be writing plugins to alter the basic backend structure and it seems unnecessarily arduous for a site like this. it's probably great for other things but i think i might have a look into alternative solutions. does anyone have any recommendations for a simple but extensible CMS solution that could drive both a regular PHP/MySQL site, alongside Flash elements? Thanks again.
  9. Hi, I've got a job through to create a CMS managed site for a music label in which they'd like some isolated flash elements; a carousel of artist cutouts the user can glide through with video, audio, richly animated etc. and a TV section of the site that exhibits music videos, interviews etc. The rest of the site is more straight forward; news, bios, store, signup, tour etc. and i was thinking of using Wordpress to drive the whole thing. My question is, can you use Wordpress to data-drive Flash elements? Ideally, i want the admin to be able add new artists to the flash carousel, new videos to the player etc, all without having to leave the WP CMS panel. Is this possible? I'm not really experienced with WP and was thinking i could just setup some new DB tables for these Flash assets to look at, and then create a custom section for the CMS, that allows for these tables to be updated. Does anyone who knows WP better than I do (so at all), know if this is possible? I tried over at Wordpress's forums but it's not exactly been enlightening thus far. If not, does anyone have any other basic CMS recommendations for driving Flash and a standard PHP/MySQL site. Cheers.
  10. Thanks, i came across that, just hate CF so was hoping there was already something setup for PHP. No worries, will have to convert it. Cheers!
  11. Hi, I'm looking for a PHP/MySQL solution possibly using jQuery that allows a user to tag an image much like Facebook i.e. draw a marquee around an image and tag accordingly. Does anyone know of an open-source solution out there that does this type of thing? Thanks.
  12. Cheers guys, I'll let the client know but will probably give it a miss if it's a subscription based service. Thanks again!
  13. Hi guys, Wasn't sure where to post this so thought i'd just drop it in general chat. Looking for a solution/name for the process wherein you enter a post code and the site returns with multiple options for addresses that match that range, we'll all have seen it before. you enter your post code i.e. M33 5XY and the site returns with 7 roadname st, 12 roadname st, 4 roadname st etc. If anyone knows what the process is referred to and/or knows of an open-source PHP/JS/AJAX/whatever solution then the info would be much appreciated. Cheers!
  14. Thanks very much, that probably explains my text-encoding errors as well! I want it to extend as i'm pulling back the width of the center column using jquery. Basically, it's a footer, the left side will be an image, the middle some info and the right a form. The form's got live validation though with validation icons that change as you type. I wanted the fields to align on the right hand side of the overall container and, when you click a field, slide the form over to the left to reveal the validation icons. This will work great, thanks again for your help.
  15. Code is: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0.1 TRANSITIONAL//EN> <html lang="en"> <head> <title>untitled</title> <meta http-equiv="Content-Type" content="text/html" charset="utf-8"> <style type="text/css"> #wrapper { position: absolute; display:inline; width: 900px; height: 300px; background: blue; overflow-y:hidden; } #leftcolumn { color: #333; border: 1px solid #ccc; background: #E7DBD5; height: 250px; width: 300px; float: left; } #middle { color: #333; border: 1px solid #ccc; background: #F2F2E6; height: 250px; width: 300px; float: left; } #rightcolumn { color: #333; border: 1px solid #ccc; background: red; height: 250px; width: 300px; float: left; } </style> </head> <body> <div id="wrapper"> <div id="leftcolumn"> <p>test1</p> </div> <div id="middle"> <p>test2</p> </div> <div id="rightcolumn"> <p>test3</p> </div> </div> </body> </html> I know it must be something stupid but i can't figure out what. Thanks for the help!

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.