islandcastaway
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: sql query helpYes.
To be specific I added it to the plugin “best related posts” to grab the thumbnail from a post that had “wordtube” content.
I have no clue if my code is 100% correct, but its working and it doesn’t throw any errors.
Cheers
Forum: Fixing WordPress
In reply to: sql query helpRE: alxvallejo wrote:
Probably too late for this one but have you tried WHERE vid = ‘$wordtubeId'”));?
I thought that I posted my fix, guess not, and not sure why @alxvallejo post isn’t here I just got via email subscription.
Newayz I got it fixed with
$image = $wpdb->get_var(“SELECT image FROM ($wpdb->wordtube) WHERE vid = ($wordtubeId)”);}
Cheers
Forum: Requests and Feedback
In reply to: Emergency – plugin removed from repositorylooks like there was a security issue fixed in release 2 days ago:
110720 Bug fix. Corrected XSS security issue associated with the handling of $_SERVER["REQUEST_URI"] inside the comment lines that Quick Cache introduces at the bottom of the source code.
Forum: Requests and Feedback
In reply to: Emergency – plugin removed from repositorywow, it came back, for the last week it wasn’t there. you couldn’t do a local search or or access the url. See thread here: https://www.primothemes.com/forums/viewtopic.php?f=5&t=14163
Would still like to know what happened. Kinda scarey.
Thanks for letting me know its back.
Would love for this feature to be completed.
You are not alone. I just posted https://www.ads-software.com/support/topic/bug-admin-pagination
Forum: Installing WordPress
In reply to: Install.php file still showing after install completeDid the install create a wp-conf.php file? Make sure that the root directory has the permissions set to 755. https://codex.www.ads-software.com/Changing_File_Permissions
Forum: Networking WordPress
In reply to: Problems with Network Admin in 3.2Do you hide the admin header? I believe the network admin link is there.
Try adding /wp-admin/network to the root domain url and that should bring it up.
To make new themes available to users you must network enable theme in the network admin panel /wp-admin/network/themes.php?theme_status=all
Forum: Installing WordPress
In reply to: Run several sites off one install?To use multiple WordPress installs using one database just use different database prefixes when you do the initial install of each site(ie. site1_, site2_, site3_). https://codex.www.ads-software.com/FAQ_Installation
You can also setup multiple sites using one WordPress install and one database by doing a network install https://codex.www.ads-software.com/Create_A_Network
Forum: Networking WordPress
In reply to: block image hotlinking on multisiteThanx,
I just found that and was looking at it.
Was looking at the difference between 2 examples on that page:
RewriteCond %{HTTP_REFERER} !^https://([a-z0-9]+\.)?domain\.com [NC]
and
RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?domain\. [NC]
Besides the https difference wasn’t sure which was a better way.
Cheers
Forum: Networking WordPress
In reply to: Remove multiple tables across WPMU databaseOk, I finally got around to trying it and I have a syntax error in my sql query statement.
I changed:
$wpdb->query('DROP TABLE IF_EXISTS '.$table_name);
to:
$wpdb->query("DROP TABLE IF EXISTS $table_name");
It workx perfect.
Someday ill get around to making this into a plugin that you can input the tables or something.
Cheers
Forum: Networking WordPress
In reply to: Remove multiple tables across WPMU databaseThanks for the % wildcard thingy. Great idea.
I melted my brain for a few mins and came up with this for a standalone php file in the root directory:
<?php // Include WordPress include_once('wp-config.php'); include_once('wp-load.php'); include_once('wp-includes/wp-db.php'); //configs $WordPressDataBasePrefix = 'wp_'; //change to daatabase prefix $tableNameToDelete = '_table'; //change to table to drop $WPMUtotalSites = '999'; //change 999 to number of WPMU sites //the death loop $i = 0; for ($n=0; $n<$WPMUtotalSites; $n++) { $table_name = $WordPressDataBasePrefix . ++$i . $tableNameToDelete; $wpdb->query('DROP TABLE IF_EXISTS '.$table_name); } ?>
I’m 99% sure this will work but im havin another beer first.
Cheers
Forum: Networking WordPress
In reply to: Remove multiple tables across WPMU databaseI understand that this is not a WordPress specific thing.
I just figured someone has done something like this already.
Droping the tables from searching thru 4000+ tables manually isn’t gonna be happening.
Thanks for your input. But like I said it would be a sql query(command line) or php script.
Cheers
Forum: Networking WordPress
In reply to: Remove multiple tables across WPMU databaseThe end goal is to remove old tables created by old inactive plugins.
I understand about removing tables and breaking things. This is not an issue for me, but thanks for the heads up.
I can kindof picture the code in my head in old school basic:
for $x = 1 to 999
$table_name = ‘wp_’.$x.’_table’;
$wpdb->query(‘DROP TABLE IF_EXISTS ‘.$table_name);
next $xDon’t laugh to hard. I just figured there is a dedicated sql query or easy php function to do this available.
Cheers
Forum: Plugins
In reply to: [Search Log] [plugin search-log] XSS vulnerabilityAlso change line #23
$search_term = urldecode( substr( $_SERVER['REQUEST_URI'], $index + strlen( '/search/' ) ) );
to
$search_term = wp_specialchars( substr( $_SERVER['REQUEST_URI'], $index + strlen( '/search/' ) ),1 );