Just another WordPress.com site

Posts tagged ‘Wordpress’

Worpress Code snippets, Like excerpt, featured image

  1. By Default WordPress displays the excerpt of the current post with the “[…]” text at the end, which is not a “read more” link. So to have a custom excerpt add following to the function.php

function new_excerpt_more($more) {
global $post;
return ‘<p><a href=”‘ . get_permalink($post->ID) . ‘”> Continue Reading</a></p>’;
}
add_filter(‘excerpt_more’, ‘new_excerpt_more’);

  1. To Enable Featured Image
  2. To Avoid Google Ranking please find detailed article at ecarobar.com
Advertisements

WordPress Plugins

Some Important WordPress plugin:

  • User Management

    • User Access Manager
    • Capability Manager Enhanced
    • Role Scoper (best combination to use with Capability Manager Enhanced)
  • Excerpt

    • Advanced Excerpt
  • Security

    • Better WP Security
    • Really Simple CAPTCHA
  • PDF

    • BSK PDF Manager
    • Print Friendly and PDF
  • Custom Post

  • Forms

  • Site Down/Maintenance

    • Maintenance Mode
  • Cross Platform/Cross CMS

    • Joomla/Mambo to WP Migrator
  • Social Media

    • Recent Tweets Widget
  • Slider/Carousel/Lightbox

User-editable text metadata | Pydio, formerly AjaXplorer

A common need for a system like AjaXplorer is to let the users enter their own comments or remarks about the files they use. AjaXplorer lets you simply define as much metadata fields as you want, with various field types available, through this plugin meta.user.

This plugin requires a « metastore » plugin to be active to do the actual storing implementation. If you are not sure of what this mean, just read the previous section. Metastore will handle the actual storing of the metadata, where as the plugin will handle how it is displayed and other users interface.

Metadata is attached to a file, which means it is moved/copied/deleted between folders when such operations are applied on the files. The plugin provides a little editor for adding/modifying these properties as simple text lines, display them in both the file list and in the infoPanel, and the added metadata is also searchable.

To add some metadata fields, simply follow the steps :

In the « Repository Features » of a workspace configuration panel, make sure a MetaStore is defined, and add a « Text Metadata » plugin to the stack.

You can see a replicable set of three fiels :

Meta Field: a technical name for the field. Please use only alphanumerical characters. See below for specific keywords.

Meta Label: will be displayed to the user

Column visibility: can be « visible » or « hidden » (without quotes). This defines whether in List mode, the associated will be visible by default or not.

Some special keywords can be used to name metadata fields, that will behave specially in terms of GUI :

stars_rate : the field automatically turns into a 5-stars rating system for the files. View and edit the rating directly in the InfoPanel, in the FilesList (in list mode only for the moment), and in the « File Meta Data » form.

css_label : the field turns into a labeling system that will apply a given css class to either the table row when in list mode, or the thumbnail cell when in thumb mode. The css classes are defined in plugins/meta.serial/css and by default they define 5 levels of priority with associated background colors. Use png transparent images as background colors, that way the user can still notice when a row is selected or not.

area_XXX : Prepending « area_ » to a field name will create a textarea field.

For example, here is below a correspondance between a set of configuration and the result for the end user :

 

via User-editable text metadata | Pydio, formerly AjaXplorer.

Metastore, meta & index plugins | Pydio, formerly AjaXplorer

As explained in the previous chapter, a workspace is mainly configured by 1/ its access driver (how do I access the actual data?) and 2/ additional plugins (enriching the data & features). This second part is handled by various plugins that are all of a specific type : metastore, meta,  and index. This order is not a random one : when adding a plugin you will notice that AjaXplorer will always reorder them like that. All these aspects will generally handle not the « data » itself (your files, their content), but « metadata », that is additionnal data describing the files. This data can be inherent to the files (e.g., the filesize can actually be seen as a metadata), or external, generated by the users (user-defined metadata) or by any system (a revision number from a versioning system).

So to take them in the order :

Metastore:

Defines how the metadata will be stored for the current workspace.  This can be linked to the underlying access driver but not necessarily.

Always the first in the stack, as meta & index plugins will often actually depend on a metastore.  Other features (like sharing and bookmarks) makes use of this feature to provide a better user experience as well. It it thus always recommanded to add at least a metastore to each workspace.

Current implementations include metastore.serial (stores files metadata on local filesystem, inside hidden files), metastore.s3 (to be used with access.s3, uses Amazon metadata capabilities) and metastore.xattr (uses file system Extended attributes, still experimental).

Generally if you are not sure, metastore.serial will do the job.

Meta:

One or many meta plugins can be added, they will actually implement the real features, and generally will require a metastore to be present for storing/retrieving their custom metadata.

Can go from user-defined metadata to quota implementation or versionning. See following sections of this manual.

Index

Indexation plugins, only Lucene is currently bundled by default, should be sufficient.

Always appears at the end of the stack, as other plugins can register metadata to be indexed by the search engine.

In the next sections, we will go through the common features one wants to implement on the workspaces. Please check the plugins documentations for detailed instruction and additional available features.

via Metastore, meta & index plugins | Pydio, formerly AjaXplorer.

P5.0.4 / WP3.6.1 Tutorial | Pydio, formerly AjaXplorer

P5.0.4 / WP3.6.1 Tutorial Recently Tested With

Contents

  1. Basic installation
  2. WordPress Side
  3. Pydio Side
  4. Result

Basic installation

  1. First install WordPress
  2. Install pydio with Mysql database
  3. Check both Wp and pydio has admin login.(Same admin username is preferred)
  4. I do not know what is the exact problem but I had some problems with different admin usernames maybe some browser cache problems.

WordPress Side

  1. Login to admin panel in WordPress and install pydio_cms_4.0.1 via Plugins/Addnew option
  2. Be aware that the original file you downloaded from sourceforge.net has all the cms plugins.So extract that file and select the directory wordpress/ajaxplorer only.You can either zip it again and upload to wordpress or copy the whole directory (only AjaXplorer in the wordpress dir) to wp-content/plugins directory.Warning !!! Be sure that there is no recurring directories otherwise the plugin install will return with error.
  3. Activate the plugin.
  4. On the dashboard select Settings/AjaXplorer
  5. In the Ajaxplorer path enter the full installation path something like : /home/user/public_html/ajaxplorer
  6. Choose a secret key
  7. Be sure that Auto Create (Create Ajxp users when they login) option is Checked to Yes.And do not forget to save changes.
  8. We finished the WordPress side.Now it’s time for Pydio part.

To Avoid Google’s duplicate Policy Please visit the complete tutorial at http://ecarobar.com/p5-0-4-wp3-6-1-tutorial-pydio-formerly-ajaxplorer-2/

P5.0.4 / WP3.6.1 Tutorial | Pydio, formerly AjaXplorer

This article is a contribution by Charmlander. Recently Tested With

Basic installation

  1. First install WordPress
  2. Install pydio with Mysql database
  3. Check both Wp and pydio has admin login.(Same admin username is preferred)
  4. I do not know what is the exact problem but I had some problems with different admin usernames maybe some browser cache problems.

WordPress Side

  1. Login to admin panel in WordPress and install pydio_cms_4.0.1 via Plugins/Addnew option
  2. Be aware that the original file you downloaded from sourceforge.net has all the cms plugins.So extract that file and select the directory wordpress/ajaxplorer only.You can either zip it again and upload to wordpress or copy the whole directory (only AjaXplorer in the wordpress dir) to wp-content/plugins directory.Warning !!! Be sure that there is no recurring directories otherwise the plugin install will return with error.
  3. Activate the plugin.
  4. On the dashboard select Settings/AjaXplorer
  5. In the Ajaxplorer path enter the full installation path something like : /home/user/public_html/ajaxplorer
  6. Choose a secret key
  7. Be sure that Auto Create (Create Ajxp users when they login) option is Checked to Yes.And do not forget to save changes.
  8. We finished the WordPress side.Now it’s time for Pydio part.

Pydio Side

  1. After all these done login to your pydio with admin account and open Settings/Global Configurations/Core Configs/Authentication panel.
  2. On the panel goto Main Instance Section and do the followings;
    • Instance Type : Remote Authentication
    • CMS Type : WordPress
    • WordPress url : This is where your logged out users will be redirected to
    • Login uri : /wp-login.php
    • Exit action : Selecet either goto specific page(to wp url above) or only perform logout.
    • Local Prefix : Enter something like wpajax_ (or similar)
    • Roles Map : Leave it blank
    • Secret Key : Your wordpress plugin secret key
    • Users : AJXP_DATA_PATH/plugins/auth.serial/users.ser
    • Transmit Clear Pass : No
    • Auto Create Users : Yes
    • Login Redirect : Leave it blank
    • Admin Login : Leave it blank
  3. Now goto wordpress dashboard and activate register users in settings/general —>Membership select Anyone can register.So your register action is activated you have to install a plugin in wordpress in order to send confirmation (send password) e-mails to users being registered if you are on a shared hosting.In this scenario I use Easy WP SMTP.Install it and configure it for sending mails.
  4. After you had configured your Easy WP SMTP plugin in WordPress and allow users to register, I think the most tricky part comes against us.If you try to register an user right now you’d encounter with an error like below :
  5. « Fatal error: Cannot redeclare ajxp_gluecode_updateRole() (previously declared in /home/user/public_html/test/pydio/plugins/auth.remote/glueCode.php:79) in /home/user/public_html/test/pydio/plugins/auth.remote/glueCode.php on line 103″ To get rid of this notorious error message open your AjaXplorer plugin file located in wordpress/wp-content folder something like /home/user/public_html/wordpress/wp-content/plugins/ajaxplorer/class.WpAjxp.php
  6. On the line 36: add_action('user_register', array(&$this, 'createUser'), 1, 1);
  7. replace it with : add_action('action=register', array(&$this, 'createUser'), 1, 1);
  8. Now Pydio can hook the register actions within the WordPress installation.

Result

After all changes are applied now you can login or register a new user in wordpress and maybe use a menu on homepage or redirect him automatically to pydio page after login.It depends on your WordPress knowledge beyond this section.All I have to say is when an user logged in WordPress, he can automatically login to Pydio without another login screen. And this is the test site where I installed while writing this tutorial.I didn’t tested it deeply but practised some login and register actions and it’s fulfilly working.If you want to try just register the site and on homepage click pydio menu on top. http://www.zonomo.com/test/wp P5.0.4 / WP3.6.1 Tutorial | Pydio, formerly AjaXplorer.

WordPress WordPress : Queries for moving from dev to live

UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');

%d bloggers like this: