misterpatrick67
Forum Replies Created
-
Forum: Plugins
In reply to: [Simple Website Banner] Close Banner CookieWould it be possible to add these options to overlay? Right now they are only available on banner and leaderboard. Right now if you close the banner you don’t get it on subsequent visits. Thanks!
Forum: Fixing WordPress
In reply to: Very Strange Permalink BehaviorOk, figured it out. I had forgotten that I had a small loop pulling navigational items in the header and for some reason that was screwing the other loops up. Stupid me.
Here is the code. Any idea what is wrong with this loop? No idea why it is totally screwing up all the permalinks when it’s included.
<?php $temp_query = $wp_query; ?> <?php query_posts('cat=22'); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <li><a href="<?php the_permalink() ?>"><?php the_title() ?></a> </li> <?php endwhile; ?> <?php endif; ?>
Forum: Fixing WordPress
In reply to: Listing Other Children of Parent PageThanks! Now here’s another question I am trying to wrap my head around. I have some static navigation that I using this on the
- ‘s to determine which one is current and styling it as current:
<?php if (is_page('pagename')) { echo "current"; } ?>
When I am using a wp_list_pages I am not sure how I can append something like this to the list item ($children). Also, with the above bit of code, I also need it to determine is it both is_page or is_parent so that the parent page is also active. So basically, when you are on a subpage you see both the parent and the particular child pag you’re on styled as “current”.
Forum: Fixing WordPress
In reply to: Listing Other Children of Parent PageThanks, your solution put me on the right track. It wasn’t showing the other children/subpages when browsing one of the children. Here’s the code that works:
<?php $children = wp_list_pages('title_li=&child_of='.$post->post_parent.'&echo=0'); if ($children) { ?> <?php echo $children; ?> <?php } ?>
Forum: Installing WordPress
In reply to: 3.1.3 upgrade issuesI just upgrades a WIP site with 3.1.3 and I can no longer log in to the dashboard. I was logged in and I am still able to work fine, but others trying to log in, or using a different browser is a no-go. I have deactivated all plug-ins, downgraded back to 3.1.2 but nothing is working. Basically, no errors or anything, it just reloads the log in screen. The URL looks like this after an attempted log in.
https://wip.url.com/wp-login.php?redirect_to=http%3A%2F%2Fwip.url.com%2Fwip%2Fwp-admin%2F&reauth=1
I’m hosting on GoDaddy which I am not happy with. Soooo slow.
Forum: Plugins
In reply to: [Fluency Admin] [Plugin: Fluency Admin] Fatal error on activationI’m getting this error:
Parse error: syntax error, unexpected T_STATIC, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/43/d354020399/htdocs/wip/wp-content/plugins/fluency-admin/wp-fluency-2.php on line 23
Running WP 3.1 and Fluency 2.4.0.1. The only plugsin I am running are:
Contact Form 7
Flash Video Player with HTML5
Mobile Theme Switcher
Peter’s Login Redirect
TinyMCE AdvancedForum: Fixing WordPress
In reply to: Assistance moving entire site from hosting company to local PC.Do you have phpMyAdmin installed? Do that, it’s free. Take a look at the table wp_options. Change the siteurl field one the first page and the home field on the second page. You can also do a database search for your old URL and see where else it’s pointing to your old host. You have to change both of those fields to get things working. Hope that helps.
Forum: Installing WordPress
In reply to: Configuring Permissions/FTP on Media Temple (DV)Ok, figured it out. The permissions on wp-admin and wp-content was incorrect.
Forum: Installing WordPress
In reply to: Configuring Permissions/FTP on Media Temple (DV)Tech support had no idea. So here is the question. Where is WordPress looking for /tmp? I can create of CHMOD the file if I know where it is supposed to be. Thanks!
Forum: Installing WordPress
In reply to: Configuring Permissions/FTP on Media Temple (DV)Thanks, but I’m not even sure where tmp is located. There is one waaaay at the root but that’s even before vhost so I doubt highly it’s that. I have root access, so if I knew where the directory was or should be that would help. Here’s the error:
Warning: touch() [function.touch]: SAFE MODE Restriction in effect. The script whose uid is 10001 is not allowed to access /tmp owned by uid 0 in /var/www/vhosts/example.com/httpdocs/wp-admin/includes/file.php on line 199
I’ll put a call in to tech support as well.
Forum: Fixing WordPress
In reply to: Simple PHP QuestionI’ve figured it out and am using scandir instead of glob. Here’s what’s working for those who are trying to do this in the future. You have to make sure that the directory names match your slug names.
<?php $post_slug = $post_obj->post_name; $dir = $post_slug . '/large/'; //my jpegs are all in this directory $scan = scandir($dir); for ($i = 0; $i<count($scan); $i++) { if ($scan[$i] != '.' && $scan[$i] != '..') { if (strpos($scan[$i], '.jpg') !== false) { echo '<div class="lightbox"> <a href="https://www.myurl.com/' . $dir . $scan[$i] . '"> <img src="https://www.myurl.com/' . $dir . $scan[$i] . '" alt="' . $scan[$i] . '" /> </a> </div>'; } } }; ?>
Forum: Fixing WordPress
In reply to: Simple PHP QuestionCloser! I am getting things returned now. I am a little confused on getting the results of the array into the images. Here’s the foreach that I have been using that works fine as long as everything is always in the same directory. Sorry the echos are a little convoluted, whenever I start messing with the quotes things start breaking so replacing things is usually one of my last steps.
foreach($files as $file) { echo "<div class='video'>"; echo '<a href="'; echo ''?><?php echo substr($file,1) ?><?php echo'" />'; echo '<img src="https://myurl.com/'?><?php echo substr($file,1) ?><?php echo'" />'; echo "</a></div>"; }?>
Forum: Fixing WordPress
In reply to: Simple PHP QuestionI really can’t figure out why this won’t work. The permalink that it is passing is fine, it just doesn’t work. For example, this works:
$directory = "." . "images/"; $images = glob($directory . "*.jpg");
This does not:
$directory = get_permalink($post->ID); $images = glob($directory . "images/*.jpg");
This is driving me batty. Any ideas? The problem is that using ‘.’ to get the root URL is fine, except I need each directory scan to be in the directory of that project. So for one page the permlink will be https://myurl.com/project_1/images/ and for the next page it will be https://myurl.com/project_2/images/ etc.
Forum: Fixing WordPress
In reply to: Simple PHP QuestionUrgh, this thing hates me. I can return the permalink on it’s own just fine, but as soon as I put it in a variable it stops working. For example, this
$directory = get_permalink() . "/large/"; echo $directory;
Return /large/
What am I doing wrong with defining $directory?
Thanks!
Forum: Fixing WordPress
In reply to: Simple PHP QuestionThe problem is, that echos the directory but for some odd reason, doesn’t seem to work with glob. This returns the permalink, but it echos it, it doesn’t actually scan the directory.
$directory = the_permalink() . "/large/"; $images = glob("" . $directory . "*.jpg");
I just don’t quite get how glob works. What the script is doing is scanning the directory in the project folder for image files, these are then output via a foreach statement.