Forum Replies Created

Viewing 15 replies - 541 through 555 (of 681 total)
  • Forum: Fixing WordPress
    In reply to: Strange users

    Follow these two steps:
    1) Delete the users
    2) Turn off user registration on your blog

    If you still want people to be able to create accounts, add a Captcha plug-in to prevent bots from creating random users on your blog.

    In the majority of cases they produce the same results. The only difference occurs when you are using a shared hosting setup with certain providers. I used to host with 1and1 Internet, and my ‘home’ and ‘url’ entries pointed to different locations – one to the actual hosting package url (…onlinehome.us/…./blog) and one to the real url (www.mydomain.com/blog).

    The other situation is when you want to have your blog at the root of your website (www.mydomain.com) but don’t want to clutter the root directory with all of the WordPress stuff. See this document for more details.

    Try this:

    $query = "SELECT product_name, product_quantity FROM transaction_detail WHERE product_name='" . get_the_title() . "';";

    I’m using ‘get_the_title()’ here because you’re not echoing the title out to the browser, just storing it in the $query variable. This should work for what you need. Let me know if it doesn’t.

    First of all, that won’t export a well-formed XML file. You’re not creating any valid XML entries … just a dump of the website with the <?xml …> tag at the top.

    Second, where are you putting this XML file? Is it just a php file that renders as XML or are you storing an XML file on the server? Either way, I’d also want to see the code you’re trying to use to call the file.

    Also, is Firefox giving you a specific error?

    Forum: Plugins
    In reply to: Do action on publish?

    The action ‘publish_post’ is run whenever a post is published or when the status becomes “published.” It shouldn’t fire when drafts are saved.

    So just:

    <?php
    add_action('publish_post', 'my_custom_function');
    ?>

    Forum: Plugins
    In reply to: RegLevel – New Version
    Thread Starter Eric Mann

    (@ericmann)

    @rapprich Could you please tell me what other plug-ins and what theme you’re currently using? If there is some interference I want to fix it, but I can’t tell what the interference is unless I know what other plug-ins people are using.

    Forum: Plugins
    In reply to: RegLevel – New Version
    Thread Starter Eric Mann

    (@ericmann)

    @dgpwerx I just tested on WP 2.8.2 and didn’t see any issues. What other plug-ins are you running? There might be something interfering with the save …

    @xinfo

    Use a modified version of songdogtech’s script:

    <form id="searchform" method="get" action="<?php bloginfo('siteurl')?>/index.php">
    <input type="text"
           value="<?php if($_GET['s']) {echo $_GET['s'];} else {echo 'Search this site';} ?>"
           onfocus="if(this.value=='Search this site'<?php if($_GET['s']) echo ' || this.value == \'' . $_GET['s'] . '\''; ?>) {this.value = '';}"
           onblur="if(this.value == '') {this.value = '<?php if($_GET['s']) {echo $_GET['s'];} else {echo 'Search this site';} ?>';}"
           name="s"
           id="s"
           size="45" />
    <input type="submit" value="Search" class="submit" name="searchsubmit"/>
    </form>

    This will populate a new search box with “Search this site” and use the appropriate JavaScript onfocus and onblur functions to clear it when the user wants to enter something. If you’re on a search results page, though, it will populate the search box with whatever the search term was.

    OK, I’ve got it. Replace the following:

    <img src="<?php echo $attachment[0]; ?>" <?php echo $attributes; ?> />

    With:

    <img src="<?php echo $attachment[0]; ?>" width="<?php echo $attachment[1]; ?>" height="<?php echo $attachment[2]; ?>" />

    According to what’s in the WordPress documentation for the wp_get_attachment_image_src() function, that should work. Let me know if it helps!

    Unfortunately that is something I don’t know how to do. I can take a look and try a few things, but it will be a few days before I can get back to you with anything.

    One more thing to change, in your dp_attachment_image() function. Change:

    if ($images = get_children(array(
    		'post_parent' => $postid,
    		'post_type' => 'attachment',
    		'numberposts' => 1,
    		'post_mime_type' => 'image',)))
    		foreach($images as $image) {
    			$attachment=wp_get_attachment_image_src($image->ID, $size);
    			?><img src="<?php echo $attachment[0]; ?>" <?php echo $attributes; ?> /><?php
    		}
    }

    To this:

    $images = get_children(array(
    		'post_parent' => $postid,
    		'post_type' => 'attachment',
    		'numberposts' => 1,
    		'post_mime_type' => 'image'));
    if ($images)
    		foreach($images as $image) {
    			$attachment=wp_get_attachment_image_src($image->ID, $size);
    			?><img src="<?php echo $attachment[0]; ?>" <?php echo $attributes; ?> /><?php
    		}
    }

    OK, version 1.1 of RegLevel is now posted and available. It fixes the problems you and others have been having with Register Plus (I’ve tested and verified that the redirects work and that different user types will receive confirmation emails).

    Unfortunately, I’m not able to integrate things with BBPress just yet. The system is designed a little differently than WordPress and I haven’t been able to get it to cooperate. I’ll keep working on things and will release an update when I can get it to work.

    Enjoy!

    Try changing this line:

    if ($thumb == NULL) { echo ''.$nothumb.'/images/defaultthumb.jpg'; } else { echo $thumb; }

    To this:

    if (! $thumb) { echo ' ' . $nothumb . '/images/defaultthumb.jpg'; } else { echo $thumb; }

    You need to have your function in ”s as well. So add_filter(‘the_content’, ‘myfunction’);

    I don’t know if this is the only issue you’re running into, but from my first glance of your description it should fix it. If not, please post a code snippet.

    adammann33 – I’ve looked into this issue, and there’s no realistic way to disable that link on the login page without disabling registration across the board. However, I am pulling the standard registration-related WordPress options into the RegLevel admin screen so you can set the default registration to something meaningful (and manage it all in one place).

    It’s not an ideal compromise but it’s the best I can do from a plug-in. To actually disable this link on the login and forgot password pages would require re-writing core files.

Viewing 15 replies - 541 through 555 (of 681 total)