Top Poster
#1 ramon fincken 232
#2 Site admin 2
#3 Ber|Art 2
#4 braddmark 1
#5 Xarzu 1
#6 Jan 0
#7 roger beckers 0
#8 Christine 0
#9 nextstep 0

The time now is Tue Feb 09, 2010 3:53 am
Ramonfincken.com Forum Index
View unanswered posts
[solution][wordpress] Problems with HTML spaces and breaks (%nbsp;,<br>), WP removes them from content
Author ramon fincken :: Posted: Sat Feb 06, 2010 12:47 pm :: Category: CMS-ses (Joomla, WordPress, etc..)


I had asked this on the WordPress linkedin groups ( of which I moderate the Dutch group at http://www.linkedin.com/groups?home=&am...anet_ug_hm ).

Quote:
I have some clients reporting to me that every time they enter a space or a break (%nbsp;,<br>) in the page/post editor ( WYSIWYG or HTML tab ) ... WordPress removes this when saving.

I have tested this on a vanilla 2.9.1 install ( so no plugins, just a straight install from the zip source ) and this turns out to be true.

Is this a bug or a feature? I don't want to edit the WP core files to "fix" this.


Wim La Haye ( http://nl.linkedin.com/in/lahaye ) suggested:
Quote:
Hey Ramon,

This is caused by a wordpress function "wpautop" (wordpress auto paragraph) which formats double line breaks to paragraphs.

The function is described here:
http://codex.wordpress.org/Function_Reference/wpautop

There are multiple plugins avaiable to counteract/disable the wpautop. Among others "disable-wpautop" ( http://urbangiraffe.com/plugins/disable-wpautop/ )





The problem with spacing still remains ...


I want to write my own wordpress plugin
Author Xarzu :: Posted: Sat Jan 30, 2010 4:30 pm :: Category: CMS-ses (Joomla, WordPress, etc..)
Tagged:


I want to write my own wordpress plugin.

Does anyone know where I can find a lits of hooks and filters and what they do?

Also, is there a book that is a good reference for people who want to write wordpress plugins?


List of Dutch provinces
Author ramon fincken :: Posted: Sun Jan 24, 2010 8:02 pm :: Category: HTML and other markup&programming languages


Ok this is mainly for my own lazyness for not having to look them up when creating a dropdown box Smile

Code:
Drenthe
Flevoland
Friesland
Gelderland
Groningen
Limburg
Noord-Brabant
Noord-Holland
Overijssel
Utrecht
Zeeland
Zuid-Holland


[wordpress] A quick guide when changing urls, subdomains, or subdomain
Author ramon fincken :: Posted: Sun Jan 24, 2010 12:57 pm :: Category: CMS-ses (Joomla, WordPress, etc..)



  1. Creating the dump/export

    1. Make a full backup of your current online files
    2. Make a full backup of your current database using PhpMyadmin


  2. Setting up the new host (Only when not on the same server)

    1. Create webspace / set up FTP ( write these down ! )
    2. Create a database with user and password ( write these down ! )


  3. Transfer files
    Transfer the files to their new location/server/directory

  4. Transfer database (Only when not on the same server)
    1. Import your database using PhpMyadmin
    2. Edit wp-config.php using values from 2b. (Only when not on the same server)
      Code:
      // ** MySQL settings - You can get this info from your web host ** //
      /** The name of the database for WordPress */
      define('DB_NAME', 'database_name_here');

      /** MySQL database username */
      define('DB_USER', 'database_user_here');

      /** MySQL database password */
      define('DB_PASSWORD', 'database_pass_here');

      /** MySQL hostname */
      define('DB_HOST', 'localhost'); // Mostly (99%) localhost



  5. Update website url in database (Only when changing URL !)
    1. Open you options table and edit the siteurl and home option values into your new URL location


  6. Permisions and file uploads
    1. Make sure any plugin or upload directories are writable by PHP/your webserver
    2. Log in at /wp-admin/ and go to miscellaneous settings ( options-misc.php ).
      Now edit/update this folder: "Store uploads in this folder" (Only when changing URL !)


  7. Update url "referals" (Only when changing URL !)
    1. Update your theme hardcoded paths
    2. Update your content if they point to an old URL location, use this plugin: http://wordpress.org/extend/plugins/find-replace/



Thanks to http://www.linkedin.com/in/stephanieleary for mentioning the file upload path


[wordpress][solution] Phpbb single signon phpbb_captcha_factory not found no object
Author ramon fincken :: Posted: Sat Jan 02, 2010 10:10 pm :: Category: CMS-ses (Joomla, WordPress, etc..)


I client had the phpbb single signon plugin installed but he encountered an error when he had to many login tries on WordPress itself.
http://wordpress.org/extend/plugins/php...e-sign-on/

Code:
class or object phpbb_captcha_factory not found


Why?
Phpbb3 logs every login attempt. If you have too many failed logins you must enter a code (CAPTCHA). But this WP plugin does not facilitate in that.

Here is the solution:
OPEN
Code:
connect-phpbb.php


FIND
Code:
// AUTHENTICATE
add_action('wp_authenticate_user','op_login',10,2);
function op_login(&$userdata,$password){
   
    if(file_exists(ABSPATH.'/'.PHPBBPATH.'config.php')){ // check to see if phpBB exists
        if(defined('IN_PHPBB')){
         return $userdata; // return if we're already in phpBB (to avoid a loop)
      }


AFTER, ADD
Code:
      
      // FIX start, RamonFincken.com WebsiteFreelancers.nl
      // Fix for phpbb3 login attempts. If too many failed logins, phpbb demands you enter a visual code
      // So include ( but do not use ) the class to make phpbb happy :)
      define(IN_PHPBB,true);
      include_once('./'.PHPBBPATH.'includes/captcha/captcha_factory.php');
      // FIX end, RamonFincken.com WebsiteFreelancers.nl
      


This solution has been reported to the author and placed at http://wordpress.org/support/topic/347509?replies=1


[wordpress][solution] My qTranslate stopped working after a WordPress upgrade
Author ramon fincken :: Posted: Wed Dec 23, 2009 9:20 pm :: Category: CMS-ses (Joomla, WordPress, etc..)


Face it ... we all love qTranslate: http://wordpress.org/extend/plugins/qtranslate/

But it disables itself the moment you upgrade WordPress itself.
I can agree with this option, but it is really annoying.

If you are sure that the qTranslate is still working >
OPEN
Code:
./wp-content/plugins/qtranslate/qtranslate.php


FIND
Code:
/* There is no need to edit anything here! */


FIND ( note: this is a PARTIAL find )
Code:
// qTranslate Editor will only activated for the given version of Wordpress.
// Can be changed to use with other versions but might cause problems and/or data loss!
define('QT_SUPPORTED_WP_VERSION',


now, INLINE, edit the last line, in my case: edit it to:
Code:
define('QT_SUPPORTED_WP_VERSION', '2.9');


[solution] Ubuntu: automatically connect and mount to windows shares
Author ramon fincken :: Posted: Sat Dec 19, 2009 6:49 pm :: Category: Lounge


Tutorial to auto mount any share, applied to Windows share.

This example will auto mount
//Windows_server_name/video_dir to my Ubunutu upon login at /mnt/videos

You may need to install Samba, smbfs and /or CIFS first:
https://help.ubuntu.com/community/Mount...ermanently
Code:
sudo apt-get install smbfs
sudo update-rc.d -f umountnfs.sh remove
sudo update-rc.d umountnfs.sh stop 15 0 6 .



  1. Make a Mount directory first
    Code:
    mkdir ~/mnt


    In order to have a share mounted automatically every time you reboot, you need to do the following:

  2. Open a shell as root

  3. Create a file containing your Windows/Samba user account details:
    Code:
    gedit /home/yourubuntuusername/.sambaautologin

    /home/yourubuntuusername is of course your own home folder containing your name

    ...it should contain two lines as follows:
    Code:
    username=share_username
    password=share_password


  4. Optional: Change the permissions on the file for security:
    Code:
    chmod 0600 /home/yourubuntuusername/.sambaautologin


  5. Now create a directory where you want to mount your share (e.g. /mnt/videos):

    Code:
    mkdir /mnt/videos


  6. Now edit the file system table (/etc/fstab) and add a line as follows: ( Make a backup first )

    Code:
    //Windows_server_name/video_dir   /mnt/videos   smbfs   credentials=/home/yourubuntuusername/.sambaautologin,rw,uid=bob   0   0

    ...where 'bob' is the non-root user you log into ubuntu with, 'Windows_server_name' is the name or address of the Windows machine and 'video_dir' is the name of the share. So if your Ubuntu login name = pete >
    Code:
    //Windows_server_name/video_dir   /mnt/video   smbfs   credentials=/home/yourubuntuusername/.sambaautologin,rw,uid=pete   0   0


  7. To mount the share now, just use the following command as root. It will mount automatically on subsequent reboots.

    Code:
    mount /mnt/videos


    Not working? Try to rewrite
    Code:
    //Windows_server_name/video_dir
    as:
    Code:
    //[ip_adres_of_windows_server]/video_dir

    and try to mount again.
    Solution about this hosts/ip problem: http://www.linuxquestions.org/questions...nt-437901/

Partially rewritten from:
https://help.ubuntu.com/community/SettingUpSamba

Read on:
http://www.arsgeek.com/2006/09/25/ubunt...dwritable/
http://www.cyberciti.biz/tips/how-to-mo...linux.html


[wordpress][solution] How to get any post info outside the loop?
Author ramon fincken :: Posted: Sun Nov 29, 2009 10:18 am :: Category: CMS-ses (Joomla, WordPress, etc..)
Tagged: , , , , ,


Start with setting $post_id, then you query the DB and reset the query.
Now you have an array, so take the first item by [0] the post.

Code:
      $post_id = POST_ID_HERE;
      $post = query_posts('p='.$post_id);
      wp_reset_query();
      $post = $post[0];


After this you'll have everything you need like $post->post_title etc !

Read on:
http://codex.wordpress.org.cn/Template_Tags/query_posts
http://codex.wordpress.org/Template_Tags/query_posts

http://stackoverflow.com/questions/1391...press-loop

http://www.mydigitallife.info/2006/06/2...-variable/
http://www.lonewolfdesigns.co.uk/excerpt-loop/
http://ifelse.co.uk/archives/2005/04/08...sts-redux/
http://www.jtpratt.com/wordpress-hack-1-query_posts/
http://www.livexp.net/wordpress/access-...-loop.html
http://www.optiniche.com/blog/15/the-wo...ide-of-it/
http://mywordpress.com/get-post-title-outside-the-loop/


All times are GMT
Who is Online
Who is Online Our users have posted a total of 231 articles
We have 9 registered users
The newest registered user is Xarzu
In total there are 2 users online :: 0 Registered, 0 Hidden and 2 Guests   [ Administrator ]   [ Moderator ]
Most users ever online was 40 on Tue Jan 05, 2010 11:59 pm
Registered Users: None
This data is based on users active over the past five minutes
Log in
Username:    Password:      Log me on automatically each visit    

New posts New posts    No new posts No new posts    Forum is locked Forum is locked
General forums
The world of freelance
Programming
Other projects
Poll
I love gifts

Yes goodies and presents! [2]
No but I love polls ! [0]

Related google ads
Where am I?
Hit me!