warleysantos
Forum Replies Created
-
Forum: Themes and Templates
In reply to: WPZOOM Academica Homepage Slideshow questionfifthace Fixing the latest timthumb to work at 000webhost.com
Older versions of timthumb.php can be exploited and your WordPress site hacked in no time. Therefore you should always use the latest version of timthumb.php. On our forums we offered a fixed version of the old timthumb script that was made to work with 000webhost. The stock timthumb.php will not work at 000webhost.com, you will get open_basedir error messages because of their server not returning the proper value for
Code:
$_SERVER[‘DOCUMENT_ROOT’]When you upgrade your existing timthumb.php to the latest version or use a theme that comes with a recent version of it you will notice your thumbnails not appearing. To fix this in a quick and dirty way you can hardcode the correct path to your public_html directory right into the timthumb.php file. Open it in a text editor and look for this bit of code:
Code:
protected function calcDocRoot(){
$docRoot = @$_SERVER[‘DOCUMENT_ROOT’];if(!isset($docRoot)){
To make timthumb work you need to replace ‘DOCUMENT_ROOT’ with the actual path to your home directory. The result then looks like this
Code:
protected function calcDocRoot(){$docRoot = @$_SERVER[‘/home/a12435678/public_html/’];
if(!isset($docRoot)){
Simply replace a12345678 with your actual userid, save the changes and upload the changed file. I tested it with the Photoria theme at 000webhost.com and the thumbnails worked fine with the path hardcoded into timthumb.php View the Post on the Blog
Works with my one ??
Forum: Themes and Templates
In reply to: WPZOOM Academica Homepage Slideshow questionhi guys, im following all the instruction for last hours and didn’t have sucess. I did all bellow.:
I appreciate it any help, thks.
i’m using .: WP 3.4.2
Theme Academica .: 1.2.2By Onyx_black.:
1.)
Open /functions/wpzoom-functions.php and find these lines (#328):Code:
echo get_category_parents($cat, TRUE, ‘ ‘ . $delimiter . ‘ ‘);Replace with:
Code:
if ($cat) {
echo get_category_parents($cat, TRUE, ‘ ‘ . $delimiter . ‘ ‘);
}2.)
Quote from gyokusai:
I placed an .htaccess file into the theme’s script folder — i.e., /wp-content/themes/academica/scripts/ — with these rewrite rules:RewriteEngine on
RewriteRule .* – [E=HTTP_IF_MODIFIED_SINCE:%{HTTP:If-Modified-Since}]
RewriteRule .* – [E=HTTP_IF_NONE_MATCH:%{HTTP:If-None-Match}]3.)
Checked if WP “Reading” settings “Front page displays” is set to “your latest post”.4.)
Enabled Slideshow in WPZOOM settings “Homepage Options” & set a static page.5.)
Click “Add a New Slide”.6.)
Create title for the slide.7.)
Upload picture/photo via “Set featured image” under “Featured Image” panel.8.)
Click on “Use as featured image”.9.)
Repeat steps 5 to 8 for any additional slides._________________________________________________________________
By gyokusai.:
.
.
.
Not so trivial:
Go to this folder: /wp-content/themes/academica/scripts/
make sure you have the latest timthumb.php version (for security reasons)
– if not, get it here: https://code.google.com/p/timthumb/
check if there’s a cache folder within the “script” folder
– I added a “temp” folder for good measure but I don’t think that’s necessary
Make sure this “cache” folder is set to 777
– try 755 in case your server is set to ignore 777 for security reasons
check if your “wp-content”, “themes,” & “academica” folders have at least 755If all fails, you should also check if the “script” and “cache” folders and the “timthumb.php” file have the same “Owner” like most of the other files (that’s often your FTP User ID; generated files within a given folder often have a different owner, i.e., “www-data”).
If it still fails, access your server’s infophp.php file (in your browser) and check if the GD library is enabled! (It really should be, but even stranger things have happened.)