gr1zzly
Forum Replies Created
-
+ 1 for “Uncaught TypeError: Cannot read property ‘currentStyle’ of null” JavaScript error relating to WPUF loading with plupload.
Specifically I am seeing this error on the ‘edit’ page, I am using WPUF v1.2.3.
The strange thing is that when I click “Add another” to upload another attachment the popup file window does appear, and appears (uhuh) to work — and so therefore I assume ‘plupload’ is working.
The trouble is it appears to have killed the post_content editor’s “Add media” button — clicking this now does nothing!
I found the following lurking in my html head, but I can’t seem to find out where this is being loaded from (i.e. where it is being enqueued or attached to an action hook such as ‘wp_head’?!)
var wpuf_attachment = {"nonce":"dba594863a","number":"6","attachment_enabled":"1","plupload":{"runtimes":"html5,flash,html4","browse_button":"wpuf-attachment-upload-pickfiles","container":"wpuf-attachment-upload-container","file_data_name":"wpuf_attachment_file","max_file_size":"2097152b","url":"http:\/\/local.snip-domain.co.uk\/wp-admin\/admin-ajax.php?action=wpuf_attach_upload&nonce=8ff3a39f9b","flash_swf_url":"http:\/\/local.snip-domain.co.uk\/wp-includes\/js\/plupload\/plupload.flash.swf","filters":[{"title":"Allowed Files","extensions":"*"}],"multipart":true,"urlstream_upload":true}}; /* ]]> */…is this relevant?
Sorry, I know this is an older thread but I was having the same ‘problem’ in that I want to be able to customise the plugin’s templates without editing the base files.
I found this plugin just recently when I searching for solutions to a client project I have. I think this plugin is great and I personally recommended this it to my client as it’s (almost) exactly what they’re looking for (except for custom templates).
I am a developer myself so I understand the need to earn something for the time and effort you’ve invested in this plugin. Unfortunately the project I’m working on has a wafer thin fixed budget and I just don’t think that I’d have any luck in convincing them to buy the Pro version.
I was just wondering if there were any action/filter hooks built in to the free version which could be used for adding/editing content in the plugin’s templates from an external file?
I did manage to find this article:
http://tareq.wedevs.com/2012/04/how-to-extend-wp-user-frontend/…but I couldn’t see anything that did quite what I’m after.
Thanks
Hi Ron,
It’s never a good idea to edit a ‘base’ file for a plugin (or WordPress itself) because if/whenever you update it your changes will be over-written and you’ll have to edit the file again. Instead it is better to implement the changes you require in a way that over-rides the ‘default’ *thing* you’re trying to change (i.e. in another file which supersedes the one you want to change).
In the case of styles this should be easy since CSS is ‘cascading’ in it’s nature and so has a logical over-ride syntax structure. Which means that in order to over-ride the default styles in the plugin you simply need write a ‘heavier'[1] style rule, and make sure that it is loaded after the plugin’s styles.
Since plugin’s are set up before the active theme then any style-sheet loaded by your theme should work to over-ride the plugin styles. — FYI the WPUF plugin uses the ‘wp_enqueue_style’ action hook.
[1] Note: ‘heavier’ means a more specific rule (based on CSS’s rule weighing metrics, e.g.#IDs ‘weigh’ more than .classes, which weigh more than <elements>). The best way to increase weight is to increase selector specificity, usually by adding an appropriate #ID.
If you are struggling to achieve an over-ride then, at a push, if you absolutely have to, you can use the ‘!important’ suffix to ‘force’ an over-ride on the appropriate style rule(s), but this is best avoided if possible!
hth
Forum: Fixing WordPress
In reply to: Test data for theme development please!!Hmm that’s odd, doesn’t seem to work for me?!
I tried chmod 755 and 775 but neither would give me access — I think Ubuntu is a bit funny when it comes to ‘root’ permissions. Then again I am a bit a Linux n00b! — Anyway in the end I tried setting the permissions to 777 (once I was safely offline) and it worked! (restored them to 755 after of course)
So I have now successfully added lwallenstein’s test data from your second link above: http://wordpress.org/support/topic/test-data-for-themers?replies=2 and can highly recommend it as a very useful and complete set of test data. It’s the best one I’ve seen yet!
As for my permissions issue I dunno, any ideas why my system setup wouldn’t work with ‘755’? — I may start a new thread or look for support from apache / ubuntu forums.
Thanks for the help though!
Forum: Fixing WordPress
In reply to: Test data for theme development please!!@michaelh – I appreciate the suggestions but this doesn’t work for me…
After manually downloading, installing and activating the ‘wordpress-importer’ plugin I went to ‘Tools > Import’ again and selected WordPress from the list of import options. I got the file selection screen and selected the XML file, then I clicked the ‘Upload and Import’ button…
This is where I get an error message saying that the import process Failed because it was unable to upload the file to the folder!
— As I said before, Linux’s folder permissions wont allow this so I need another “non-WordPress Admin panel” solution, hence the request for a raw SQL file that I can install using phpMyAdmin!
Forum: Fixing WordPress
In reply to: Test data for theme development please!!@chantalc – Yeh I tried that, but as I said my Ubuntu linux setup won’t let WordPress ‘upload’ the file to the folder. (I’m using a LAMP localhost development server).
@michaelh – Yeh I’ve downloaded both of the test data set’s you’ve listed, but as I’ve described to ChantalC above, WordPress can’t upload them to install the data. Hence the need for a “pure from phpMyAdmin” exported SQL / XML file.
Failing that are there any Linux LAMP guru’s on here can tell me how to safely and securely allow WordPress write privileges to it’s own folder system?
Forum: Hacks
In reply to: Can you see the flaw in my IF-THEN statement?These are my top “Helping myself” resources when I’m working with WordPress:
The Loop – The Loop out puts all of your posts data to the page so understanding this is key!
Template Tags – WordPress’ Template Functions (use within “The Loop” !)
Function Reference – A guide to WordPress’ built in PHP Functions.
Writing a Plugin – Help creating your own Plugins for WordPress.
Widgets API – For help when creating your own widgets, or adapting a plugin into a widget.
As you’ll see the codex here is pretty comprehensive and with a reasonable knowledge of (X)HTML and PHP (plus CSS for styling of course) there’s everything you need to get you started with customising and developing your own templates, functions and plugins etc. for WordPress.
hth
Forum: Themes and Templates
In reply to: Logo disappearing when custom permalinks used, please help!Not used this theme, so I may be wrong here but…
…it sounds as though the image’s URL was given as a hard coded relative link. So when you change the ‘directory’ in the URL the position of the image file relative to the new page isn’t the same.
Again, this is of course just an educated guess on my part, having not used this theme.
Have a look at the code in header.php and see if the src=”…” is something like:
src="<?php bloginfo('template_directory'); ?>/image-subdirectory(if any)/image-filename.ext"OR
src="<?php bloginfo('stylesheet_directory'); ?>/image-subdirectory(if any)/image-filename.ext"hth
Forum: Themes and Templates
In reply to: How to? Display category posts in 2 columsHow are you with CSS? In styles.css try:
.post { border-left:1px solid #ddd; float:left; padding:0 12px; width:50%; } .post:nth-child(odd) { border-left:none; }I haven’t tested this but off the top of my head this should give you two posts side by side with a faint grey line in between them. The padding makes sure that there is a gap between the content of the post and the line, while the second rule prevents the left hand side posts from also having a left border.
Of course you could add whatever styling you want with CSS, if you’d prefer not to have a vertical border between the posts etc.
This is most likely the easiest way without customising a template file for this purpose. Hopefully it should at least get you somewhere near.
If your not sure how to edit styles.css:
You can access styles.css in the admin panel’s theme editor, just select the file from the right hand list, scroll to the bottom of the file and paste the code there.Worst comes to worst and my code doesn’t work simply edit the file again and delete what you just pasted!
hth
Forum: Fixing WordPress
In reply to: How do I register as a Plugin Developer?ahh, email! 😀
Thanks Samuel!
The permalinks are only applied after the root domain part of the URL (edit – well actually after the ‘root’ URL for the WordPress installation!). So what you’ve effectively done (i’m guessing) is create a permalink structure that equates to…
“http://www.lebronnewsonline.com/lebronnewsonline.com”
..or something like that.
One way I can think of to fix this would be to edit the WordPress database directly using phpMyAdmin, which you may have available under you hosts domain control panel.
1. Open phpMyAdmin and select the relevant WordPress database –
this should should be something like “your domain name” OR “your domain user name” underscore ( _ ) “whatever you called your WordPress blog”.2. Once you’ve clicked on the database name it’ll show you the tables within that database. You need to select the “wp_options” table and then the “browse” tab.
3. Find the row with the “option_name” of “permalink_structure” –
this should be at the top of page 2 so just click on the Next “>” button above the table results.4. Click on the pencil (“Edit”) icon to the left hand side of the row and delete the text in the “option_value” field then click “Go” to save the changes.
Leaving this field blank should return WordPress to it’s default “ugly” URL’s and hopefully get the site working again. You’ll be able to edit the permalink structure again within the WP admin panel. Possibly after reading this.
hth
Forum: Fixing WordPress
In reply to: help permalinksHmm, without time to look more closely at your function I cannot say if that would even work!
However, if you want to add any images to a post use the “add image” button across the top of the main text box on the post edit page in the admin panel.
By using this WordPress will do all the hard work for you – it will upload the image and store it in the database, accessible under the ‘media’ section in the admin panel where you can easily edit the image and it’s properties.
Once you’ve selected and uploaded your image you have to set the properties for it – such as title, alt-text, position and image size. Then click ‘Insert into post’ and WordPress will automatically add the necessary code to the post for you, it will also automatically associate the image and post on the database side too!
hth
Forum: Themes and Templates
In reply to: Hiding Tags Below PostsIf there isn’t an option to do so in the themes settings (if it has an Admin page!) then you’d have to edit the template files directly – Of course then it’ll depend on which ‘pages’ you want them removed from e.g.: Posts, Pages, Archives, Categories, Tags etc. can all have their own template file with unique code in. Or possibly just the ‘loop.php’ file with themes in a Twenty Ten style!
The function to look for in the code is the_tags(), simply delete this piece of code. OR it may be safer to just comment it out with either:
// Double forward slash marks a single line comment # As does the hash or pound sign as it's sometimes called /* for multi-line comments use a slash star.... ....star slash combination*/These must all occur within the <?php ?> tags
Forum: Everything else WordPress
In reply to: Defining link hover properties in single text widgetHow are you putting the links in to the text widget?
— The easiest thing would be to give the links themselves a unique css class directly. OR better still use the existing classes to access the required links…
The default code for a sidebar and text-widget look like this:
<div id="primary" class="widget-area" role="complementary"> <ul class="xoxo"> <li id="text-3" class="widget-container widget_text"> <h3 class="widget-title">TEST</h3> <div class="textwidget"> <p>an arbitrary test text widget!</p> </div> </li> </ul> </div>…so if you want to reference the links contained only within the text-widget then it’s as simple as:
.textwidget a {/* css rules here */} .textwidget a:hover {/* hover styles */}hth
Forum: Fixing WordPress
In reply to: Style last post in loop differently?— better late than never —
Hi, I had a look at the other post you’d linked to and I can see why you couldn’t exactly follow it, I think they were making it more complicated than it needs to be.
Here’s the code I’ve just written to do the same job:
<?php /* The Loop */ ?> <?php $post_counter = 0; while ( have_posts() ) : the_post() ?> <?php $post_counter++; ?> <div id="post-<?php the_ID(); ?>" <?php if( $post_counter == count( $posts ) ) post_class('last-post'); else post_class(); ?>>The conditional statement simply test IF the $post_counter has reached the same number as the total counted posts, you can then call the post_class() function with or without any additional class as needed. You can add as many classes as you like this way, just comment them and comma separate!
hth