Forum Replies Created

Viewing 15 replies - 166 through 180 (of 496 total)
  • wpismypuppet

    (@wordpressismypuppet)

    Yup, it’s gone… All content is stored in the database. The only chance you might have is to contact the hosting provider and hope that they do auto backups. But even those might only be on a nightly basis, not hourly. Good luck!

    wpismypuppet

    (@wordpressismypuppet)

    I got this from their tech support:

    >
    > Is it possible to redirect users to a thank you page after they submit a
    > comment?

    Hi Daniel,

    Thanks for getting in touch with us.

    Jetpack Comments does not currently include such feature.

    To solve this issue, I would recommend searching for a comment redirection plugin in the plugin repository, and test it to see if it’s compatible with Jetpack Comments:
    http://wordpress.org/extend/plugins/

    Please let us know if you have any more questions.

    Jeremy
    Happiness Engineer | WordPress.com | Automattic

    Since you’ve already tested all the plugins, I’m guessing you’re out of luck at this point. And since people get directed to a different site to submit comments, I doubt you could use JavaScript.

    You “might” be able to use PHP $_SERVER[‘HTTP_REFERER’] variable on your single.php page to check incoming traffic and redirect them based on where they came from? I haven’t tested it, and don’t really know how Jetpack works, but that might be your best shot.

    wpismypuppet

    (@wordpressismypuppet)

    Glad I could help…

    wpismypuppet

    (@wordpressismypuppet)

    There is an error is the JavaScript file. There is a file called jic.js, and on line 124 there is a called for event.preventDefault(), however event is not defined. Here is the snippet:

    $(".jic_next").click( function() {
    event.preventDefault();
    jQueryImageCarousel.next();
    });

    and it should look like this:

    $(".jic_next").click( function(event) {
    event.preventDefault();
    jQueryImageCarousel.next();
    });

    The reason it works in some browsers and not in other is in the way the browser handles JavaScript. Apparently Chrome can figure out the issue… Firefox is a little more strict. In either event, the code is wrong and should be corrected.

    Also, looking through that same JavaScript file, there are multiple occurrences of this same problem. So just fixing that one snippet isn’t going to correct the error. You’ll have to look for every occurrence of event.preventDefault() and make sure that the function call contains the variable event.

    wpismypuppet

    (@wordpressismypuppet)

    Sorry for not getting back to you sooner… things came up. The snippet of code that you put in the functions.php file definitely works… as long as you are sending them to a page within your site. I’ve tested and used the code myself. I double checked it again this morning to make sure it works.

    The reason it’s not working for you probably has something to do with Jetpack. I’ll do more research and see what I can find, but I don’t know much about Jetpack.

    wpismypuppet

    (@wordpressismypuppet)

    No problem… let me know how it works out.

    wpismypuppet

    (@wordpressismypuppet)

    It’s hard to tell exactly what that code is doing, but it seems to me that this is pulled from a function and not inside any loop?

    You have this line of code:

    $post = get_post($single->ID); // unless $single is already a complete object

    Which looks like it’s getting a post object. Maybe you need to place your:

    $news = get_post_meta($post->ID, 'newsMP', true);

    Line AFTER that get_post() command? Not only that, but you could simplify your custom field by just typing in “news” or “videos” and change this line:

    $cgtitle='<div class="cgback cgnojs '.$this->params['showtitle'].'"></div><div class="cgtitle cgnojs '.$this->params['showtitle'].'"><p style="font-size:'.$cgfontsize.'px;line-height:'.(1.2*$cgfontsize).'px;"><a href="'.$returnlink.''.$news.'">'.$title.'</a></p><div id="lol">'.$excerpt.' </div></div>';

    To something more like this:

    $cgtitle='<div class="cgback cgnojs '.$this->params['showtitle'].'"></div><div class="cgtitle cgnojs '.$this->params['showtitle'].'"><p style="font-size:'.$cgfontsize.'px;line-height:'.(1.2*$cgfontsize).'px;"><a href="'.$returnlink.'?fromwhere='.$news.'">'.$title.'</a></p><div id="lol">'.$excerpt.' </div></div>';
    wpismypuppet

    (@wordpressismypuppet)

    Sounds like what you are looking for is to check the dimensions of the file being uploaded and then either accepting or denying it’s existence based on that!

    If this is the case, it’s involved… you’ll need PHP’s getimagesize() function and then right conditions based off your findings. Keep in mind that you’ll probably have to pair that with something to check the file extension first and make sure it’s actually an image.

    Now I know some will say that this can be accomplished by JavaScript… and I agree! However, JavaScript can easily be disabled and if that’s your ONLY solution, it will fail.

    You’ll want a JavaScript front end check for immediate feedback, and then a PHP fallback to handle people who try to bypass stuff.

    wpismypuppet

    (@wordpressismypuppet)

    Just copy and paste the whole WordPress installation into the appropriate sub-folder. For example… http://www.rti3.com/2011. That URL will run off it’s own WordPress theme and installation, ignoring the one on the root (http://www.rti3.com).

    The only issue is it’ll still use the same database. To fix this issue, you’ll need to make a backup of your wp-config.php file for the root WordPress install. Then, delete it from the server. When you visit http://www.rti3.com you’ll be prompted to recreate this file. Open up the wp-config.php you just backed up and use all the same values… EXCEPT, change:

    Table Prefix: wp_

    from the default ‘wp_’ to something more unique. You could even start using the year, since you’ll be archiving the new site next year. So change it to:

    Table Prefix: 2012

    This way ALL your WordPress installations will use the same database, but different tables. They won’t overwrite one another. Make sense?

    The only thing that stinks about this approach is having multiple copies of WordPress to eat up space… but storage is cheap these days. It’s interesting that you want to archive an entire website this way. Most just archive a page or something.

    wpismypuppet

    (@wordpressismypuppet)

    Something like this… though it’s not tested because I don’t know how you are handling your current hash methods. So it’s more a guess… but hopefully put you in the right direction.

    <script type="text/javascript">// <![CDATA[
    $(document).ready(function() {
    	function filterPath(string) {
    		return string
    		.replace(/^//,'')
    		.replace(/(index|default).[a-zA-Z]{3,4}$/,'')
    		.replace(//$/,'');
    	}
    	var locationPath = filterPath(location.pathname);
    	var scrollElem = scrollableElement('html', 'body');
    
    	$('a[href*=#]').each(function() {
    		var thisPath = filterPath(this.pathname) || locationPath;
    		if (locationPath == thisPath && (location.hostname == this.hostname || !this.hostname) && this.hash.replace(/#/,'') ) {
    			var $target = $(this.hash), target = this.hash;
    			if (target) {
    				var targetOffset = $target.offset().top;
    				$(this).click(function(event) {
    					event.preventDefault();
    					$(scrollElem).animate({scrollTop: targetOffset}, 400, function() {
    						location.hash = target;
    					});
    				});
    			}
    		}
    	});
    
    	// Check the current URL on page load to see if a hash was passed
    	if ( window.location.hash ) {
    		var targetOffset = $('a[href*=' + window.location.hash + ']').offset().top;
    		$(scrollElem).animate({scrollTop: targetOffset}, 400);
    	}
    }
    // ]]></script>

    By the way, if you aren’t the best at JavaScript, how did you get your code? If it were pulled off a website, can we see that link to better assist?

    wpismypuppet

    (@wordpressismypuppet)

    That’s because your code is set to look at every anchor tag on the page and add a click event to scroll to a location inside the page itself. You have no code that looks at window.location.hash when the page loads!

    You’ll want to add something to the effect of:

    if(window.location.hash) {
    	// scroll to the target you want using similar code to your animate targetOffset
    }

    Inside your $(document).ready() function, but outside your $('a[href*=#]').each() function. Let me know if you need more details. We’ve done this quite a bit on some of our client’s websites.

    wpismypuppet

    (@wordpressismypuppet)

    I think this is what you are looking for…

    http://www.deluxeblogtips.com/2010/03/wordpress-redirect-to-thank-you-page.html

    You are probably more interested in the “action hook” since you mentioned the functions.php file. Let me know if this helps!

    wpismypuppet

    (@wordpressismypuppet)

    Yup… I forgot a closing ) on the first if statement. Try this:

    <?php
    $referer = $_SERVER['HTTP_REFERER'];
    if ( $referer == "http://www.enberwebsite.com/testtest/sample-page/" ) {
    	if( isset( $_GET['fromwhere'] ) ) {
    		if( $_GET['fromwhere'] == 'news' ) {
    			echo '<div id="news">news test</div>';
    		}else if( $_GET['fromwhere'] == 'videos' ) {
    			echo '<div id="videos">videos test</div>';
    		}
    	}else {
    		echo '<div id="bgphotos"></div>';
    	}
    }
    else {
        	echo '<div id="bgvideos"></div>';
    }
    ?>
    wpismypuppet

    (@wordpressismypuppet)

    I would think the only way this is accomplished is to have a different theme being displayed for mobile devices, even if the mobile theme is identical in every aspect to the full site theme with the exception of your plugin. There are plugins (of course) that accomplish this for you, and you can customize the mobile theme… take a look here and see if that helps:

    http://www.wpbeginner.com/wp-tutorials/11-ways-to-create-a-mobile-friendly-wordpress-site/

    We’ve used WPTouch before, but it’s not SEO friendly. Easy to work with though…

    wpismypuppet

    (@wordpressismypuppet)

    Well, I’d have to see the code to help you better. Do you have a link to your website? I could check out the source and see more what you’re talking about. We may have to rethink the JavaScript approach.

    The problem with changing the code in the plugin is that you’ll lose those changes if and when you update the plugin! So that might not be the best option…

    And forgive me, but I don’t give my email out here on the forum as I don’t like to have random people email me with questions 🙂 Simply respond to this thread and I’ll get the message!

Viewing 15 replies - 166 through 180 (of 496 total)