proximity2008
Forum Replies Created
-
Forum: Plugins
In reply to: [Plugin: Custom Field Template] Uploader progress?Nate,
Start a new thread. This is going off topic.
The support for custom post types was only added in 1.6 and I haven’t played with it yet. In the past I’ve used pages and tied in different page templates with different custom field forms.
If you’ve added the custom fields correctly you should see it in the cft drop down when you enter content for your post.
Forum: Plugins
In reply to: [Plugin: Custom Field Template] Uploader progress?If you use a textarea with the the media embedder you will have further problems when you try out the image on the front end. I’d stick with the file input.
I try the file upload field, all that is returned in the meta field is a number, rather than a file location and name.
That is the point. It is far more usable storing the image_id than a filename as it makes the plugin flexible. If you save an image id you can access just about everything you want from it when you go to output it on the front end. Of course the trade off is that you will need php to do it.
For example:
$image_src = wp_get_attachment_image_src($your_custom_field, $size);
Will allow you to access the image path, width and height of the image.
Check the WordPress codex for further info.
Forum: Plugins
In reply to: [Plugin: Custom Field Template] Custom CSS fileHi Gojsse,
What I usually do now is add a javascript and css files to the Template instructions area, like so:
<script type="text/javascript" language=javascript" src="/wp-content/themes/yourtheme/admin/cft.js"></script> <link href="/wp-content/themes/yourtheme/admin/cft.css" rel="stylesheet" type="text/css" media="screen" />
So now you can manipulate the CFT how you want.
Hope this helps.
Forum: Plugins
In reply to: [Plugin: Custom Field Template] Uploader progress?Hi Heroic,
The upload progress would be tricky. It is probably too difficult to do at this stage. The ability for a user to edit the image that has been uploaded could be done; if you know some javascript or jQuery.
I would go about it by adding a link to the right of the image that holds the uploaded attachment_id. The only way you can do that easily is by javascript. You can attach your own javascript files in the Template instruction area inside the CFT template.
That attachment_id can be used to open up the admin Media.php file. E.g.
/wp-admin/media.php?action=edit&attachment_id=attachment_id in a popup window. The user could make the edits from there, add captions etc and what would affect that image that you’d previously uploaded.A bit of an effort, but doable.
I hope that makes a bit of sense?
Forum: Plugins
In reply to: [Plugin: Custom Field Template] Definite bug: values from keys removedbump.
Forum: Plugins
In reply to: plug in for link from my menu to other site? or static pageshello,
Assuming that you are using pages this is how I would do it:
1. Create a page called wikipedia
2. Order the pages how you want. I would recommend using a plugin called PageMash for this.
3. Open up .htaccess in the server root and put in a 301 redirect:
Redirect 301 /wikipedia/ https://www.wikipedia.com/whatever.htmlYou could also look for a redirection plugin.
Forum: Plugins
In reply to: [Plugin: Custom Field Template] Issue with drop down html outputHi Solid,
You’d have to use the code section in the CFT.
[licence] type = select code = 0
Then in the Code 0 area:
$values = array(); $values[] ='<a rel="nofollow" href="https://creativecommons.org/licenses/by/3.0/">Attribution (Creative Commons)</a>'; $values[] ='<a rel="nofollow" href="https://creativecommons.org/licenses/by/3.0/">Second Option</a>'; $values[] ='<a rel="nofollow" href="https://creativecommons.org/licenses/by/3.0/">Third Option</a>';
This should do it.
Have a nice day.Forum: Plugins
In reply to: Caption Not Correctly DisplayingI had this problem a week ago:
Very simple fix:Forum: Fixing WordPress
In reply to: Caption Shortcode Processing FuncI have the answer for you here too Kandi:
Forum: Plugins
In reply to: [Plugin: Custom Field Template] WordPress does not process custom text fieldHi Kandi,
Yes I got is sorted:
<?php $unprocessedfield = get_post_meta($post->ID, 'nameofyourcustomfield',true)); $processedfield = apply_filters('the_content', $unprocessedfield ); echo $processedfield; ?>
Forum: Plugins
In reply to: [Plugin: Custom Field Template] Hiding the Post Textarea[Categories] type = select after = <style type=text/css>#postdivrich {display:none;}</style>
This is an example that I used. It doesn’t matter if the embedded style rule is before or after the custom field – here it is after.
I’ve tested it in IE6 and it doesn’t work. But it does work fine in IE7+, FF,Opera and Safari.If you use multiple Custom Field Templates, when you load between them it will update the #postrichdiv area fine.
Are you using the latest version of Custom Field Template?
Forum: Plugins
In reply to: [Plugin: Custom Field Template] Hiding the Post TextareaHi,
How about using CSS to hide it?
I did a quick test with this applied to one of my custom field elements:
after = <style type=text/css>#postdivrich {display:none;}</style>
It works in IE7 and FF have not tested it in others.Forum: Requests and Feedback
In reply to: [Plugin: Custom Field Template] Preview image for textareaFound out it was better to use a select drop down. For anyone looking for something similar see below:
[Photo] type = select code = 2 after = <div></div> multipleButton = true onchange = var start = (this.value).indexOf('<'); this.parentNode.getElementsByTagName('div')[0].innerHTML = (this.value).slice(start);
code 2:
global $wpdb; $values = array(); $attachments = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . 'posts WHERE post_type="attachment"'); foreach ($attachments as $attachment) { $str = $attachment->post_title; $str .= '[' . $attachment->ID . ']'; $img = wp_get_attachment_image($attachment->ID, $size='thumbnail', $icon = false); $str .= $img; $values[] = $str; }
The only issue I get now is the multiple button does not save multiple entries ??
Forum: Plugins
In reply to: displaying all attachmentsThanks for sharing – I’ve tried your function. What is the function web_get_blog_id()? WordPress complains it doesn’t exist.
Using WordPress 2.8