pszeinert
Forum Replies Created
-
It seems like a lot of work to go through to paste code, but I guess I understand.
That said, here is the code that was removed from above:
I thought I figured this out a number of times, but I finally got to an answer with a dead simple method.
Go to line 33 and add:
$attachID=get_post_meta($post->ID,'_pin_image',true);
Then go to line 55 (it was line 54 before we added that last line) and replace the entire line with:
<input type="hidden" name="pin_image" id="pin_image" value="'.$attachID.'" />
If you want to make it really easy, replace the entire public function for pinterest_html() with the following line of code; REPEAT – if you did the steps above, you do not need to do this.
[Code moderated as per the Forum Rules. Please use the pastebin]
Basically what we have done is pre-populate the hidden input value with the already saved image ID value. If it does not exist, it outputs nothing and therefore saves nothing if you don’t add something. If you click remove a picture you have already save, it will still remove it.
To optimize this code, it would be better to not save a value unless there is a change. My fix always saves a new value, even if it is the same as before. Small price to pay (a few milliseconds?), nevertheless good code is good code.
Forum: Networking WordPress
In reply to: Get multisite network base url?@jnorion: For whatever reason with my setup, bloginfo(‘url’) only returns “/” (without quotes). If you look at my code above, I don’t have an echo before bloginfo(‘url’). With echo it returns nothing (which I know), but without echo it only returns the forward slash.
echo site_url(), echo get_bloginfo(‘url’), and bloginfoI(‘url’) should all return the same value, but I am not able to get the expected output from bloginfo(‘url’).
I have it working for my purposes now using site_url(), and this is really a discussion about which way to skin a cat. Bottom-line, my cat is skinned. Hope this helps other entrepreneurial coders.
Forum: Networking WordPress
In reply to: Get multisite network base url?Well, despite all the bickering, jskov’s solution worked perfectly for me. In my case, I simply needed to echo the blog url for a multisite setup, but bloginfo(‘url’) and bloginfo(‘siteurl’) were returning a lone forward slash, nothing else.
//ex. echo bloginfo('url'); //returned /
I tried echo get_site_url(2).$_SERVER[“REQUEST_URI”]; and it worked perfectly. I dug a little deeper and found that I should have been using
get_bloginfo(‘url’) instead.//ex. echo get_bloginfo('url'); //returned https://subdomain.domain.com
…also site_url() accomplishes the same thing. So to recap:
//ex. echo get_bloginfo('url'); //returned https://subdomain.domain.com //ex. //note bloginfo() returns a value, so echo is unnecessary. bloginfo('url'); //returned / //ex. echo site_url(); //returned https://subdomain.domain.com
Forum: Plugins
In reply to: [WPaudio MP3 Player] No MP3 Play Button, Just a Link!Worked like a charm Ursula! Saved me a lot of heartache.
Thanks
Forum: Installing WordPress
In reply to: [UPDATE Error]wp-includes/query.php array line 2390I’ve had Hotfix installed on three of my sites since it was version 0.1 (now 0.5) and I have never had a chance to test it. Within 2 minutes of the above issue being brought to my attention, I had found this thread and wondered why Hotfix had not worked for me.
…then I checked and realized it was installed but not activated. Now everything is as it should be.
Hotfix is the number one recommendation anytime someone asks what plugins I use. No site should run without it.
evanw,
I have implemented your fix on two sites and everything seems to be working fine now. Great job!
I’m getting the same error. Good insight into the problem. I am working on a work around because it appears that it only affects the admin panel. I don’t want to inconvenience our users, so I have asked our admins to put up with it until I can code a fix. Hopefully Disqus will beat me to it.
Forum: Plugins
In reply to: [Front-end Editor] [Plugin: Front-end Editor] Blog title on 1.9.2Good point. I just hadn’t noticed this until the update. Maybe it’s always been there.
Forum: Plugins
In reply to: [Front-end Editor] [Plugin: Front-end Editor] Blog title on 1.9.2I am having problems as well, but it is on a dev-blog using 3.1, so I am happy (I should say relieved) to see others having issues.
As best I can tell, there is a search/append function that looks for the post title and wraps it with <span>…</span> to assist the javascript.
The problem is that the theme I have activated uses the post title as the image title and alternate text in addition to the headline.
Here is a small example:
<h3><a href="https://candy95.aggielandsrock.com/2010/11/beauty-and-the-beast-on-broadway/"> <!-- first occurance of FEE <span> --> <span data-type="input" data-post_id="199" class="fee-field fee-filter-the_title">Beauty and the Beast on BROADWAY!</span></a></h3> <div class="post-date">Tuesday, November 23rd, 2010</div> <div class="post-tnail"><a href="https://candy95.aggielandsrock.com/2010/11/beauty-and-the-beast-on-broadway/" <!-- second occurance of FEE <span> --> title="<span data-type="input" data-post_id="199" class="fee-field fee-filter-the_title">Beauty and the Beast on BROADWAY!</span>"><img src="https://candy95.aggielandsrock.com/wp-content/themes/imperial/thumb.php?src=https://candy95.aggielandsrock.com/wp-content/uploads/2010/11/beauty-beast.jpg&w=372&h=100&zc=1&q=95" <!-- third occurance of FEE <span> --> alt="<span data-type="input" data-post_id="199" class="fee-field fee-filter-the_title">Beauty and the Beast on BROADWAY!</span>" /></a></div>
The first comment is near the intention of the plugin, but the latter two are collateral damage due to my themes author using the post title instead of any other meta info.
Look forward to the next update so I can use this again. I really like where it is headed.
Patrick
EDIT: Formatting
Forum: Plugins
In reply to: [Theme Check] [Plugin: Theme-Check] Suggestion broke the site.Great! Hopefully this all shakes out by late-December or early-January.
Forum: Plugins
In reply to: [Theme Check] [Plugin: Theme-Check] Suggestion broke the site.Installed the dev version and ran the theme check again. Some of the earlier “recommendations” and “info” disappeared. Did you make it less stringent?
Specifically, I no longer see a warning about an absolute URL I placed in there and using include instead of get_template_part().
On the plus side, it does say this:
Theme passed all the tests!Forum: Plugins
In reply to: [Theme Check] [Plugin: Theme-Check] Suggestion broke the site.Since I already fixed the issue with my code, I will assume this solves it. Thanks for the prompt attention, and thanks for the plugin. It’s really useful for cleaning up themes I have purchased outside of the www.ads-software.com community.
Forum: Alpha/Beta/RC
In reply to: Admin Bar covering top part of pageAdded to this ticket:
Admin Bar Problem
https://core.trac.www.ads-software.com/ticket/15592Thanks for verifying the issue exists.
Forum: Alpha/Beta/RC
In reply to: Admin Bar covering top part of pageThe picture linked below show what a logged in user sees and what a logged out visitor sees on the default TwentyTen theme.