Forum Replies Created

Viewing 15 replies - 1 through 15 (of 63 total)
  • misterpatrick67


    Would 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!

    Ok, 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; ?>

    Thanks! 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”.

    Thanks, 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:

    $children = wp_list_pages('title_li=&child_of='.$post->post_parent.'&echo=0');
    if ($children) { ?> <?php echo $children; ?>
    <?php } ?>

    I 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.

    I’m hosting on GoDaddy which I am not happy with. Soooo slow.

    I’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 The only plugsin I am running are:
    Contact Form 7
    Flash Video Player with HTML5
    Mobile Theme Switcher
    Peter’s Login Redirect
    TinyMCE Advanced

    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.

    Ok, figured it out. The permissions on wp-admin and wp-content was incorrect.

    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!

    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/ on line 199

    I’ll put a call in to tech support as well.

    I’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.

    	$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="'  . $dir . $scan[$i] . '">
    				<img src="' . $dir . $scan[$i] . '" alt="' . $scan[$i] . '" />

    Closer! 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="'?><?php echo substr($file,1) ?><?php echo'" />';
        echo "</a></div>";

    I 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 and for the next page it will be etc.

    Urgh, 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?


    The 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.

Viewing 15 replies - 1 through 15 (of 63 total)