Formatting readme.txt file for WordPress Plugin - wordpress

I published a free plugin to WordPress repository and I could not format readme.txt file to display ordered list in the correct way, all the list items appears on the same line.
please check the description on this link:
https://wordpress.org/plugins/wp-cloaker/
I tried to separate the list items by comma as this article says
http://www.smashingmagazine.com/2011/11/improve-wordpress-plugins-readme-txt/
but it does not work
any help?

It's markdown...You need a blank line between your initial content and the ordered list:
Here are some Features of **WP Cloaker** plugin:
1. Hide, shorten your links.
2. Custom redirection type: 301,302,303,307 and Javascript redirection.
3. Categorize your links.
4. Custom permalinks e.g : www.yoursite.com/visit/link-category-slug/link-slug.
5. Track links clicks, each time a visitor click on any link, the plugin will store the visitor information like (IP address, click date/time, Country, etc..).
6. You can add third party tracking code.
As the file has currently been written, that blank line does not exist.

Related

What is spb_raw_html in WordPress?

I'm trying to edit a page in WP (not the original owner, so I don't know how it was configured) and the post contents (visual + text) shows:
[spb_raw_html width="1/2" el_position="first"]OEKF93JIFO4F...
Etc. A hundred+ lines of letters and numbers. First, I'm just trying to identify what this is so I can edit the page.
It is a page build with Swift Page Builder.

Wordpress Feed Creator Name Tag Full Name Instead Of First Name

I am parsing a Wordpress feed in my iOS application. I don't know much about Wordpress and its customisation. The feed shows the author name as below:
<dc:creator>andy</dc:creator>
while i want it to show the full name of the author in the feed like:
<dc:creator>andy rubin</dc:creator>
Can anybody point out where i can go to do that. Thanks!
Open your Wordpress dashboard and go to Users > All Users and select edit for the user for which you want the full name to appear. You will see the option "Display name publicly as". From drop down list you can choose the full name.
In the feed you might still see first name but once you parse it in your iOS project, it will show you the full name.
Hope this helps!
There are a variety of ways to customize your feeds.
1 - through the use of a WordPress pluggins such as http://wordpress.org/plugins/feed-template-customize/
2 - changing display settings from the Wordpress dashboard
3 - or by manually changing the feed templates to meet your needs
Editing your feed templates manually is much the same as editing your theme templates but not integrated into WP theme system
The Feed templates are located in the /wp-includes/feed-{type}.php files and include formats for rdf, rss, rss2 and atom but it is better to do not edit directly the files from this folder.
You can follow the Customizing Feed Templates section of the codex and peek the function you need from this list and use it within the Loop.

Drupal 7 link node to basic page

Ok I'll try to explain a little better.
I have created a view to display 3 items of a certain content type on homepage.
When I click each piece of content it takes me to actual content eg node22.
I need to be able to change this so when content on homepage is clicked it goes to a specific url alias I have already setup eg contact us page.
Any idea what I need to achieve this??
We really need more info on your view to answer this but here are some thoughts.
If your display type is content the title automatically links to the node page so I will assume this is not what your issue is.
If you are using fields view just select the checkbox that says: "Link this field to the original piece of content". It is available in most "node" fields such as nid and title.
From above your example is how to "link node 49 to education page" You may be just needing the path module for that. Enable the core path module and then visit the node page you want to set a custom url for. Their should be a tab called "URL Path Settings" at the bottom of the page. Spice those up a bit more by downloading and installing the path auto module and the node url wil automatically be set when you create it.

Creating a Drupal view with an RSS feed

I am very new to Drupal and I need a bit of help. I am working with Drupal 6 (because that is what the site uses).
I was asked to make a View that would display a RSS feed of certain parts of the website and I don't understand how to do this. I know how to create a View and that it must be set as a "feed". But I am not clear about what to do from here. From the examples I have seen (and not entirely understood), it seems you might need to to modify the arguements or fields, but in which way?
Also, what exactly does the "attach to" in the feed settings do?
You will want to create a view, and add a display of type feed using row style: node.
The default behavior will assume you want to include all fields on the node in the feed.
However, you can control the fields that are included in the feed by going to Content Management > [Your content type] > Display fields > RSS. From here there are checkboxes which allow you to select fields for exclusion when being displayed as part of an RSS feed.
The "attach to" setting allows you to select a page or block view on which to display an RSS icon that links to this feed.
Depending on the content you want to include in the feed, you will want to set a filter, most likely on node: type, and node: published.

Is there a Drupal module that can redirect from root URL to a certain page?

I wonder if there's a Drupal module that can do this kind of functionality: if i go to home page, it will take me to some subpath within the site. i.e. www.something.com will redirect to www.something.com/product/node/11.
I tried creating an alias and used Path redirect module but for some reason, i can't reach the expanded URL when going to home page. it will display the content of www.something.com/product/node/11 but still using www.something.com.
I'm thinking that this can only be implemented in Apache server, not inside Drupal?
Note that our purpose of doing this feature is whenever a new product is created, we want our home website to point to that (i.e. www.something.com -> www.something.com/product2/home, before www.something.com/product1/home). If this is configurable inside Drupal, the changes would be easier and can be done by a Drupal administrator.
You should be able to go to /admin/settings/site-information and set the Default Front Page at the bottom of the form. That doesn't do a redirect: the home page will BE whatever you set the default to.
Create a new view (Node type) named "frontpage_redirect"
As suggested in answer by Michael D, create and save a view configured to search for your specified criteria:
display: page display, path = frontpage-redirect
pager: 1 item
row style = Fields
fields: Node => Node ID
filters: node type = product
sort: post date desc
Save your new view
At admin/config/system/site-information, set your "Default front page" to the view display path above (frontpage-redirect in my example)
In the view edit screen select "Theme: Information" link in the Page display. Look for the most specific (rightmost) entry under "Field Node: Nid (ID: nid)" - should be something like views-view-field--frontpage-redirect--page-1--nid.tpl.php, but will depend on the view name and display name. Copy the default views template views-view.tpl.php into your theme folder using the filename from 3.
Edit the template and put this code in it:
if (isset($row->nid)) {
drupal_goto('node/' . $row->nid);
}
This way of setting up the redirect lets you drive it from Views, which gives flexibility. When your customer decides in six weeks that they want to feature only the latest red product on the frontpage, you'll be able to update the logic behind the redirect using the views UI. (And you can do it from your phone on the train home!)
You avoid the need to create a custom module (which is easy enough, but does add some complexity) or to move your site logic into .htaccess.
Using the Views module, create a new view that displays one full node, ordered by last created, filtered appropriately, then create a page display in the view. Then follow Graham's instruction to set the site homepage to the view URL.
Another way would be to write a very simple custom module that db-queries for the latest node created of the sort you want, grab the URL to the page, then redirect there using drupal_goto().
There are other ways to do what you want inside Drupal, but I can't think of any that are more direct and simple at the moment...
What you are asking seems wrong. Sorry if I misunderstand some detail, but it seems you should reconsider the problem on a higher level.
If I understand you right, you want to show the page for the latest product as the homepage?
If so, maybe you should turn that into show the latest project page on the homepage. That fits a lot better with the RESTfullness of the web. And with expectations of the users.
The pattern would then be:
GET /products/22 shows product 22
GET /products/23 shows product 23
GET /product/latest shows the last product (in this case, the page would be exactly similar to /products/23)
To achieve that, you can use views module.
On similar lines to Michael D's post, assuming you want to pull the most recently published product from a custom content type called "products," you could put something like this in your settings.php:
function yourtheme_preprocess_page(&$variables) {
$query = db_query("SELECT nid FROM {content_type_products} ORDER BY nid DESC LIMIT 1");
while ($row = db_fetch_object($query)) {
$redirect_nid = $row->nid;
}
if ($variables['is_front'] == 1) drupal_goto("/node/" . $redirect_nid);
}
modify the .htaccess file.
http://drupal.org/node/50322#comment-2456576

Resources