Forum Replies Created

Viewing 15 replies - 286 through 300 (of 318 total)
  • Forum: Plugins
    In reply to: [Plugin: Upload ] WP 2.6

    No news…

    Here’s a dump of uploadplus.php

    <?php
    /*
    Plugin Name: Upload+
    Plugin URI: http://pixline.net/wordpress-plugins/upload-plus/en/
    Description: Security and sanity in file names while uploading. Once activate, please <a href="options-general.php?page=uploadplus">define your settings</a>.
    Author: Pixline
    Version: 2.5.1.x Patched for 2.6
    Author URI: http://pixline.net/
    
    Copyright (C) 2007/2008 Paolo Tresso / Pixline (http://pixline.net/)
    
    Includes hints and code by:
    	Francesco Terenzani (http://terenzani.it/)
    	Jennifer Hodgdon (http://www.poplarware.com/)
    
    Uses UTF8 PHP classes by http://phputf8.sourceforge.net/
    
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version 2
    of the License, or (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    */
    
    require_once 'utf8/utf8.php';
    require_once 'utf8/str_ireplace.php';
    require_once UTF8 . '/utils/validation.php';
    require_once UTF8 . '/utils/ascii.php';
    require_once 'utf8_to_ascii/utf8_to_ascii.php';
    
    $version = get_option('uploadplus_version');
    if ($version == '') $version = 0;
    
    if ($version < 3) {
    	add_option('uploadplus_style','a:1:{i:0;s:1:"1";}','Choose what style will be used','yes');
    	add_option('uploadplus_lettercase','a:1:{i:0;s:1:"1";}','Make all lowercase','yes');
    	update_option('uploadplus_version', 3);
    	}
    
    /* add option page */
    function upp_add_mangle_options_page(){
    	if(function_exists('add_options_page')){
    		add_options_page('Upload+ Options','Upload+',8,'uploadplus','upp_mangle_options_page');
    	}
    }
    
    /* the real option page */
    function upp_mangle_options_page(){
    global $wp_db_version;
    
    	if (isset($_POST['info_update'])) {
    		$style = serialize($_POST['uploadplus_style']);
    		update_option('uploadplus_style',$style);
    		$lettercase = serialize($_POST['uploadplus_lettercase']);
    		update_option('uploadplus_lettercase',$lettercase);
    
    		if( !empty($_POST['uploadplus_prefix_custom']) && $_POST['uploadplus_prefix']=='none' ){
    			update_option('uploadplus_prefix_standard','none');
    			update_option('uploadplus_prefix_custom',$_POST['uploadplus_prefix_custom']);
    		}elseif($_POST['uploadplus_prefix']!='none'){
    			update_option('uploadplus_prefix_custom','');
    			update_option('uploadplus_prefix_standard',$_POST['uploadplus_prefix']);
    		}
    		echo('<div id="message" class="updated fade"><p><strong>Settings saved.</strong></p></div>');
    	}
    
    	$flag1 = ""; $flag2 = $flag1; $flag3 = $flag1; $flag4 = $flag1; $flag5 = $flag1;
    	$x = get_option('uploadplus_style');
    	//$x = unserialize($y);
    	if($x == 1){ $flag1 = 'checked="checked"'; }
    	if($x == 2){ $flag2 = 'checked="checked"'; }
    	if($x == 3){ $flag3 = 'checked="checked"'; }
    
    	$new_lettercase = get_option('uploadplus_lettercase');
    	//$new_lettercase = unserialize($opt_lettercase);
    	if($new_lettercase == 1){ $flag4='checked="checked"'; }else{ $flag5='checked="checked"'; }
    
    	$custom		= get_option('uploadplus_prefix_custom');
    	$standard	= get_option('uploadplus_prefix_standard');
    	$pref_custom = "";
    	$prefs = array("none"=>"","md"=>"","ymd"=>"","ymdhi"=>"","ymdhis"=>"","random"=>"","unix"=>"");
    
    	if($custom!=""){
    		$pref_custom = $custom;
    	}elseif($custom==""){
    		$prefs[$standard] = "selected='selected'";
    	}
    
    	$test_string1 = "WordPress Manual (for dummies, experts and pro's) 2.2nd Edition.pdf";
    #	$test_string1 = 'У беларускіх гарадах працягваецца паказ культавага швэдзкага кіно.pdf';
    #	$test_string3 = 'اذاعة شباب اف ام.pdf';
    	$demo_string1 = upp_mangle_filename($test_string1);
    #	$demo_string2 = upp_mangle_filename($test_string2);
    #	$demo_string3 = upp_mangle_filename($test_string3);
    
    	echo("<div class='wrap'>");
    	echo("<form method='post' accept-charset='utf-8'>");
    
    	echo("<h2>Upload+ Options</h2>");
    	echo("<p>Welcome to Upload+. This plugin allows you to rename every file you upload, and in this page you can define this behaviour.</p>");
    	echo("<p> According to your actual ruleset, your files will be renamed like this:<br />
    	<ul>
    	<li> <em>".$test_string1."</em><br /> saved as &rsaquo; <strong>".$demo_string1."</strong></li>
    	<!-- li> <em>".$test_string2."</em><br /> saved as &rsaquo; <strong>".$demo_string2."</strong></li>
    	<li> <em>".$test_string3."</em><br /> saved as &rsaquo; <strong>".$demo_string3."</strong></li -->
    	</ul>
    	</p>");
    
    	echo("<p><small>You can choose to <em>convert spaces and underscores into dashes</em>, <em>strip all dashes/underscores/spaces</em>, or <em>convert every spaces into an underscore</em>. Also, you can choose to <em>lowercase</em> the file name or leave it with mixed case, and finally you can define a custom prefix to prepend, either a fixed one (like the name of your blog) or a date-based one. Feel free to play with the settings and save them, because you can check in this page what kind of transformation will be applied.</small></p>");
    
    	if($wp_db_version < 6846) $tableclass = "editform optiontable"; else $tableclass = "form-table";
    	echo('<fieldset class="options" name="set1">
    
    	<legend>Cleaning rules</legend>
    	<table class="'.$tableclass.'">
    
    	<tr>
    	<th scope="row" valign="top">Basic cleaning</th>
    
    	<td>
    
    	<p><input type="radio" name="uploadplus_style[]" id="uploadplus_style-1" value="1" '.$flag1.'/>
    	<label for="uploadplus_style-1">Convert spaces and underscores into dashes.
    	<small>[ &rsaquo; <em>wordpress-manual.pdf</em> ]</small></label></p>
    
    	<p><input type="radio" name="uploadplus_style[]" id="uploadplus_style-2" value="2" '.$flag2.'/>
    	<label for="uploadplus_style-2">Strip all spaces/dashes/underscores.
    	<small>[ &rsaquo; <em>wordpressmanual.pdf</em> ]</small></label></p>
    
    	<p><input type="radio" name="uploadplus_style[]" id="uploadplus_style-3" value="3" '.$flag3.'/>
    	<label for="uploadplus_style-3">Convert spaces into underscores (dashes allowed).
    	<small>[ &rsaquo; <em>wordpress_manual.pdf</em> ]</small></label></p>
    
    	</td>
    	</tr>
    
    	<tr>
    	<th scope="row" valign="top">Lowercase</th>
    	<td>
    	<input type="radio" name="uploadplus_lettercase[]" id="uploadplus_lettercase-1" value="1" '.$flag4.'/>
    	Make ALL lowercase.
    	<input type="radio" name="uploadplus_lettercase[]" id="uploadplus_lettercase-0" value="0" '.$flag5.'/>
    	Leave untouched.
    	</td>
    	</tr>
    
    	</table>
    	</fieldset>');
    
    echo('<fieldset class="options" name="set1">
    	<legend>Prefix</legend>
    	<table class="'.$tableclass.'">
    
    	<tr>
    	<th scope="row" valign="top">Prefix</th>
    	<td><p>
    	<select name="uploadplus_prefix" id="uploadplus_prefix">
    	<option value="none" label="No prefix, or custom prefix">No prefix, or custom prefix</option>
    	<optgroup label="Human Readable">
    	<option value="d" label="dd (like: '.date('d').'_)" '.$prefs['d'].'>d (like: '.date('d').'_)</option>
    	<option value="md" label="mmdd (like: '.date('md').'_)" '.$prefs['md'].'>mmdd (like: '.date('md').'_)</option>
    	<option value="ymd" label="yyyymmdd (like: '.date('Ymd').'_)" '.$prefs['ymd'].'>yyyymmdd (like: '.date('Ymd').'_)</option>
    	<option value="ymdhi" label="yyyymmddhhmm (like: '.date('YmdHi').'_)" '.$prefs['ymdhi'].'>yyyymmddhhmm (like: '.date('YmdHi').'_)</option>
    	<option value="ymdhis" label="yyyymmddhhmmss (like: '.date('YmdHis').'_)" '.$prefs['ymdhis'].'>yyyymmddhhmmss (like: '.date('YmdHis').'_)</option>
    	</optgroup>
    
    	<optgroup label="Other Styles">
    	<option value="random" label="[random (mt-rand)] '.mt_rand().'_" '.$prefs['random'].'>[random] '.mt_rand().'_</option>
    	<option value="unix" label="[unix timestamp] '.date('U').'_" '.$prefs['unix'].'>[unix] '.date('U').'_</option>
    	<!-- option value="blog" label="[blog name] '.strtolower(get_bloginfo('name')).'_" '.$prefs['blog'].'>[blog] '.strtolower(get_bloginfo('name')).'_</option -->
    	</optgroup>
    
    	</select>
    	</p><p>
    	<input type="text" name="uploadplus_prefix_custom" size="50" id="uploadplus_prefix_custom" value="'.$pref_custom.'"/><br />
    	<small>Enter your custom textual prefix (like "prefix_"). Please note this is a *string*, so please do not use php <em>date()</em> arguments :-)</a>.</small>
    	</p>
    	</td>
    	</tr>
    
    	</table>
    	</fieldset>');	
    
    	echo('<p class="submit">
    	<input type="hidden" name="action" value="update" />
    	<input type="submit" name="info_update" value="Update Settings &raquo;" />
    	</p>
    	</form>');
    
    	echo('<hr/> <p><small><a href="http://pixline.net/wordpress-plugins/upload-plus/">Upload+</a> is GPL&copy; <a href="http://pixline.net/">Paolo Tresso / Pixline</a>. UTF8 php classes and translitteration by <a href="http://phputf8.sourceforge.net/">phputf8</a>.<br /> If you find this plugin useful you can donate and support its development. Thank you!
    
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_s-xclick">
    <input type="image" src="http://pixline.net/files/img/paypal.gif" border="0" name="submit" alt="Support via PayPal">
    <img alt="" border="0" src="https://www.paypal.com/it_IT/i/scr/pixel.gif" width="1" height="1">
    <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHoAYJKoZIhvcNAQcEoIIHkTCCB40CAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCWFVjdnjjwNstok9imIihjZ7vj2nJnPKeA/zKWr9V/+DuhtJ1O49EOyEEF8paBdAb+Bmzoh4VcNPe15Ut9kLEfCskRH+q6GITWP0nqkPmk2dqstpD08du2/uJJC8TCIsnJYH/qD1Fl2R3vYWrvAiGXXDhxpgDGiYgCtJ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/XQ0Xof0B+WTzE1MEfPA-----END PKCS7-----
    ">
    </form>
    </p>');
    
    	echo("</div>");
    }
    
    /* find extension */
    function upp_findexts ($filename) {
    	$exts = split("[/\\.]", $filename) ;
    	$n = count($exts)-1;
    	$exts = $exts[$n];
    	return $exts;
    } 
    
    /* find full filename */
    function upp_find_filename ($filename) {
    	$explode = explode("/",$filename);
    	$explode = array_reverse($explode);
    	return $explode[0];
    } 
    
    /*    sanitize uploaded file name    */
    function upp_mangle_filename($file_name){
    	/* remove internal dots (cosmetical, it would be done by WP, but we need to display it :)*/
    	$ext = upp_findexts($file_name);
    	$file_name = str_replace(".".$ext,"",$file_name);
    	$file_name = str_replace(".","",$file_name);
    
    	// initial cleaning
    	$file_name = str_replace("(","",$file_name);
    	$file_name = str_replace(")","",$file_name);
    	$file_name = str_replace("'","",$file_name);
    	$file_name = str_replace('"',"",$file_name);
    	$file_name = str_replace(',',"",$file_name);
    
    	// some language-based prefilter. props denis.
    	$de_from 	= array('ä','ö','ü','ß','Ä','Ö','Ü');
    	$de_to 		= array('ae','oe','ue','ss','Ae','Oe','Ue');
    	$file_name	= str_replace($de_from, $de_to, $file_name);
    
    	if ( utf8_is_valid($file_name) ) {
            $file_name = utf8_to_ascii($file_name);
        }else{
            $file_name = utf8_to_ascii($file_name);
    	}
    
    	$file_name = $file_name.".".$ext;
    
    	$un_lettercase = get_option('uploadplus_lettercase');
    	//$un_lettercase = unserialize($lettercase);
    	switch($un_lettercase):
    		case "1":
    			$file_name = utf8_strtolower($file_name);
    			break;
    	endswitch;
    
    	$x = get_option('uploadplus_style');
    	//$x = unserialize($y);
    	switch($x):
    	case "1":
    		$file_name = ereg_replace("[^A-Za-z0-9._]", "-", $file_name);
    		$file_name = utf8_ireplace("_", "-", $file_name);
    		$file_name = utf8_ireplace(" ", "-", $file_name);
    		$file_name = utf8_ireplace("%20", "-", $file_name);
    		break;
    	case "2":
    		$file_name = ereg_replace("[^A-Za-z0-9._]", "", $file_name);
    		$file_name = utf8_ireplace("_", "", $file_name);
    		$file_name = utf8_ireplace("-", "", $file_name);
    		$file_name = utf8_ireplace("%20", "", $file_name);
    		break;
    	case "3":
    		$file_name = ereg_replace("[^A-Za-z0-9._]", "_", $file_name);
    		$file_name = utf8_ireplace("-", "_", $file_name);
    		$file_name = utf8_ireplace(" ", "_", $file_name);
    		$file_name = utf8_ireplace("%20", "_", $file_name);
    		break;
    	endswitch;
    
    	$custom = get_option('uploadplus_prefix_custom');
    	$standard = get_option('uploadplus_prefix_standard');
    
    	if($custom!="" && $standard=="none"){
    		$file_name = $custom.$file_name;
    	}else{
    		switch($standard):
    			case "d":		$file_name = date('d')."_".$file_name;			break;
    			case "md":		$file_name = date('md')."_".$file_name;			break;
    			case "ymd":		$file_name = date('Ymd')."_".$file_name;		break;
    			case "ymdhi":	$file_name = date('YmdHi')."_".$file_name;		break;
    			case "ymdhis":	$file_name = date('YmdHis')."_".$file_name;		break;
    			case "random":	$file_name = mt_rand()."_".$file_name;			break;
    			case "unix":	$file_name = date('U')."_".$file_name;			break;
    #			case "blog":	$file_name = strtolower(get_bloginfo('name'))."_".$file_name;	break;
    		endswitch;
    	}
    
    	return $file_name;
    }
    
    /* apply out changes to the real file while it's being moved to its destination */
    // $array( 'file' => $new_file, 'url' => $url, 'type' => $type );
    function upp_rename($array){
    global $action;
    	$current_name = upp_find_filename($array['file']);
    	$current_name = urldecode($current_name);
    	$new_name = upp_mangle_filename($current_name);
    	$lpath = str_replace($current_name, "", urldecode($array['file']));
    	$wpath = str_replace($current_name, "", urldecode($array['url']));
    	$lpath_new = $lpath . $new_name;
    	$wpath_new = $wpath . $new_name;
    	if( @rename($array['file'], $lpath_new) )
    	return array(
    		'file' => $lpath_new,
    		'url' => $wpath_new,
    		'type' => $array['type']
    		);
    	return $array;
    }
    
    add_action( 'admin_menu', 'upp_add_mangle_options_page' );	// add option page
    add_action('wp_handle_upload', 'upp_rename');				// apply our modifications
    ?>

    Sure.

    For others who need this background:

    both ASCII and binary files can be sent in binary mode with no problems, but sending a binary file in ASCII mode will corrupt the binary file’s structure. ASCII mode makes for faster transfers, but if you accidentally upload a Microsoft Word file or JPG image in ASCII mode, your file will hit the server dead on arrival. If there’s any question, transfer in binary mode.

    Of course, we wouldn’t have such a handy rule without one exception:CGI scripts. You must use ASCII mode when sending CGI scripts. They just won’t work otherwise!

    Hey Rebecca,

    I use this theme, somewhere. A mess of various colors? Email me the link please…hopefully I’ll catch you in the next few minutes…

    Dang it.

    I even tried editing the plugin’s .js to tweak the jQuery:

    jQuery(this).children(‘ul’)
    .css({ listStyleImage: ‘none’ });

    jQuery(this).children(‘li’)
    .css({ listStyleImage: ‘none’ });

    // Supress the liststyleimage
    jQuery(‘li’, this)
    .css({ listStyleImage: ‘none’
    });

    Forum: Plugins
    In reply to: Image shack error in WP2.6

    Thanks.

    Forum: Plugins
    In reply to: Image shack error in WP2.6

    What is the obfuscated code (base64?) in this file?

    Drupal.

    If you have the resources (time and mojo) to develop a real CMS, Drupal is the way to go. The framework abstraction is brilliant. Not for the spoon-fed though and like all things which allow some folks to earn a living wage -filled with reticent mercenary-type developers. Well worth learning.

    I think the radioactivity is the shadow of: WP is a blogging platform that lends itself to styling, rather than data node abstraction. It is what it is and it looks good doing it. Just like Microsoft Windows NT back in the day when it was pimped as a server OS. Still makes me laugh. Years later, the emperor has a thong…

    When I spoke with EventBrite, they were very enthusiastic about solving my issues. I like them.

    For those following the action at home, no joy, link sent…

    Hey George,

    I feel your pain! I’ve spent months looking at Drupal etc to finally realize that people have already invented fire, all I had to do was to integrate their great work into my site…

    I suggest signing up for an account with EventBrite. They have every event management thing you need including setting up free tickets etc. You can run reports, reserve tickets, contact specific groups etc. Awesome. Just awesome.

    Joyless.

    I was excited for a moment there!

    From the plugin, does this help?

    echo '<ul class="enhanced-categories-' . $this->ul_index . '">';
    		wp_list_categories($r);
    		echo '</ul>';

    I tried ul.enhanced-categories-1 etc…

    May I email you the link to this early alph dev site (I’m not worthy) via your website?

    How about serious money to recommend a plugin? This plugin is pretty cool (besides the Geo stuff) in that you can call specific templates for specific quicktag calls…

    I set this up this morning for a friend. It has gravatar support too, although I couldn’t get that to work -not that important right now…

    Send money and kittens and orange juice with lots of pulp ASAP.

    Forum: Plugins
    In reply to: Image shack error in WP2.6

    Let’s fix it!

    Ok, it looks like in WP 2.6 the function it needs (media_admin_css) has been moved from wp-admin/includes/media.php to wp-includes/general-template.php. Note the name of the function and the way it is used has changed too!

    so to fix it:

    Edit the imageshack.php file at line 177

    media_admin_css('css/media');

    Delete that and put this in the same place:

    // Hack: RedFish: START:
    			// Hack to make WP 2.6 compatible.
    			// Replaced original line.
    			// media_admin_css('css/media');
    			wp_admin_css('media');
    // Hack: RedFish: END:

    I label my edits to make it clear which part of what multi-file hack is where…

    Oldskool. Before SVN etc!

    Forum: Plugins
    In reply to: Image shack error in WP2.6

    Urrgh, me four

    Hey Pete,

    Besides the files you’ve put on your server (that have your post images etc) you’re going to need the contents of your wp database on your old server/host to load into the database you’ll have to create on your new host. May as well create the exact same named database and database user and password for now…

    To get the contents, you could ask your old host for an SQL backup of your old wp database (or do it yourself if you know how). Ask for full data and structure so that the SQL will create the tables if they do not exist…

    I’m generalizing here, but that works for most setups. If your db is huge (you use zipcode lookup tables or country info etc) you may run into PHP timeouts/sql file size limitations even if you choose a compressed sql file, but let’s cross that bridge if you come to it!

    Look in wp-config.php for the name of the db that WP uses. You’ll have to setup the exact same thing on your new host.

    So you’re editing the contact form using the plugins settings page, you generate the BBC tag, paste it into the form where you want it, save the entire form, go to your post or page in HTML (not visual) mode and paste the [contact-form4] or similar tag and save/publish that post/page?

    Clearing your browser cache didn’t help?

Viewing 15 replies - 286 through 300 (of 318 total)