Jump to content

articles, adsense, processwire or wordpress


pwired
 Share

Recommended Posts

Google wants us to write a lot of articles so our site goes up in the rank list. Now a friend of mine is doing this with wordpress with his website pattayaplaza.com He also does hotelbookings. He has chosen for wordpress because it was made for blogging and articles. Now I got myself familiar with processwire and can do some things with it and are growing because of this great forum. My question now is do I have to start learning again a new cms (wordpress) or can I stick to processwire and do the same with it, that is writing articles and blogs and trying to use adsense to make some money ?

Link to comment
Share on other sites

I'm not sure what you're exactly trying to say here, but the answer is "definitely not." There's nothing WordPress can do that ProcessWire can't do. Actually I'd go as far as claim that it's quite the opposite.

Articles or blog posts? Just create templates for those and start writing. In case that you need help for specific problems and/or parts or ideas, ask. If you'd prefer to start a proper blog from the scratch, check out Blog Profile

Did this answer your question or is there still something you're wondering?

  • Like 5
Link to comment
Share on other sites

Articles or blog posts? Just create templates for those and start writing. In case that you need help for specific problems and/or parts or ideas, ask. If you'd prefer to start a proper blog from the scratch, check out Blog Profile.

Teppo thanks for your fast reply. I meant actually articles like in my friends website pattayaplaza.com. Here is an example of some of his articles http://pattayaplaza.com/visiting/street-views/ My friend told me that the more articles, the more google is going to bring you up in the search rank.

Just create templates for those and start writing.

I guess you mean templates for that in the administration.Would I need for every article with picture as shown in the example, a separate field for each article text ? pictures could go in their own image field. Just would need to find a way to keep the pictures with their related articles.

As you can see the first 3 or 4 lines of an article are shown and then ends with "read more" that links to a page where the whole article can be read. Would that mean 2 text fields for each article ? I guess with some php and api one could pull out the first 3 or 4 text lines from the full article in a field and output it on the page. Then with a link go to the full article.

My friend told me also that the articles written in wordpress are very seo friendly. Would that be the same in processwire ?

About roughly how many template files would I need to come up with the same website as pattayaplaza.com

I think the photo slideshow used on his website would be best in processwire as an include with all the html in an external file saved in the folder templates.

Did you see the green topnavigation bar of pattayaplaza.com ? If you click on a word in the green topnav a new subnav appears underneath it. Each word in the green topnav corresponds to a set of clickable words in

the subnav. How do you make something like that ?

How would I realize this in processwire ?

http://en.support.wordpress.com/stats/#views-by-country

How much coding / api experience would I need to do a site like pattayaplaza.com in processwire ?

Thanks

Link to comment
Share on other sites

If no one links to the articles, google won't care about them at all. Focus on quality, not on quantity.

If for example you type in (english) yahoo.com search bar "pattaya klang road" his article about pattaya klang road on his website comes up second on the first page ! If you enter "pattaya klang road" in (english) google.com search bar the same article comes up third on the first page ! I think that is really darn good and I don't think he is using links to the articles but all wordpress seo. Please don't get me wrong, I am not trying to defend wordpress here, just trying to find out how I could use processwire in the same way.

Link to comment
Share on other sites

PWired,

I think what is being said here is that there is more to site rankings, SEO than writing lots and lots of articles. Of course, you can write lots of articles if you want...but it doesn't mean your site rankings will go up. There are a number of issues you raise here so maybe not good to get mixed up. Here's my take.

  1. Blog: You can easily create a blog in PW. This will come with all the ease of templating and powerful API that PW offers. Of course you can create one in WP too and none of us will be offended :). Personally, I wouldn't create anything with WP..I've tried it before and don't want to go there again ;)
  2. SEO/Site rankings: Whether a blog or some other sort of site, there are tips on how to improve your search rankings. Google these.
  3. Templating: There are a number of approaches. Key questions are these: Do I need lots of templates or few? How do I justify whether few or lots? The fewer the templates you can get away with the better for you, I think. By using PHP conditional statements (if's) with PW you can be as versatile as possible and use a few templates.
  4. How to organise your pages: Here I refer to the images questions. I'm sure you know that there are various approaches to this in PW. You can use Soma's image manager (in Alpha currently!); You can create one page to hold all your images. You can upload multiple images for each page. You can include inline images in the rich text editor (not all like this ;)). Which one you choose depends on your needs.
  5. Read more, etc...that's ridiculously easy in PW. Have you looked at the default PW installation? There are a number of ideas there. E.g. , the text before the read more can come from a description or summary text field. You click more it shows you the whole article. E.g.
echo "<p>{$myarticle->summary}<a href='{$myarticle->url}'>Read more...</a></p>";

That will give you something like:

 a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. Read more...

I gotta run. I'll probably write more later. This reminds me, I really need to write that tutorial about how to approach templating...
 
Hope this helps...
 
  • Like 3
Link to comment
Share on other sites

echo "<p>{$myarticle->summary}<a href='{$myarticle->url}'>Read more...</a></p>";

That would take 2 text fields, or am I wrong ? To get the first 3 lines from an article field, what about some php coding that reads the first 3 lines (or the first x words) from the full article in a field, and then output the first 3 text lines between html tags on the template file, together with a link to the full article page like in kongondos example ?

$text = $page->article

If someone has a better php approach

I'm not a php coder but here is my first try and I am sure there are mistakes in it:

<?php

$file = fopen($text,"r");

$count = "0";

while(! feof($file))

{

$count++;

if ($count=="1") {

$line1 = fgets($file);

}

if ($count=="2") {

$line2 = fgets($file);

}

if ($count=="3") {

$line3 = fgets($file);

}

}

echo $line1;

echo $line2;

echo $line3;

fclose($file);

?>

Link to comment
Share on other sites

@PWired,

I've seen this approach before but it has various problems. One, it will invariably cut words in the wrong places, leaving some sentences "hanging". It can cut off a perfectly "harmless" word into one that has a totally different (even offensive) meaning! The better approach, IMO, is to use a summary field for summaries and a body/content field for main content. Of course if the summary field is empty then there will be no summary :). You can get round this by making the summary field a required field or outputting a summary field only if it is not empty...which may not be desirable in some cases.

The code above has only 1 field; the summary field. The "url" bit will be grabbed for you automatically by PW. It is a property of the $page object, so called "Built-in Fields Reference". See the API docs. I suppose you are looking at some basic PHP tutorials? Depending on how comfortable you are at the moment, two of your best friends will be print_r ($exampleVariable); and var_dump ($exampleVariable); These will show you all the stuff within a $page object.

I don't mean to be rude but I suggest you really dig into the PW default install as well as the "simpler" API documentation, i.e. selectors and variables ($page and $pages). Even if you have read them before, look at them again and again. That's what has been helping me. They are my constant companion. Try things out by example. For instance, in my tests site, I have a test page exclusively for testing variables and selectors. Of course you can use the selectors module but I do this to see things how they will really look like on a website. I hope this makes sense. 

Another suggestion I'd make is to take a simple working HTML page and convert that to PW. Along the way, document/annotate the logic you will use and why. For instance, what will be a field in a page and why? What will be pulled in from other pages? E.g. pull in the summary fields of the first 5 pages in the category articles, etc.

  • Like 1
Link to comment
Share on other sites

Thanks kongondo. It is going to be fun though to get this working with php. As with the cutting off a text line in an inappropriate way, what about reading the first x words and output them instead of the first 3 lines ? Yes a summary field would be sure because you can decide your self where to end a line. I think I am going to need an article template file and then use php and loop until the last article for a page and then output all the found articles for that page in a list or simply stacked on top of each other. What would be an example to loop through all the articles on a page and output them ?

Link to comment
Share on other sites

Wait. Why are you using fopen()? This is for opening files on the server. Or I'm very far from understanding what you want, or something is very wrong here :D

I think this is what you're after http://processwire.com/talk/topic/22-how-to-build-a-news-page/?p=51

Edit:

I'm predicting a little problem with Ryan's code that I linked to if you use it with a tinyMce field, because it doesn't take in account the html tags that the formatter will add to it. So, you will have an opening <p> but most likely, you won't have the closing </p>. I guess this is quite safe to assume, so you could echo the summary like this:

echo $summary . "</p>";
  • Like 1
Link to comment
Share on other sites

Wait. Why are you using fopen()? This is for opening files on the server. Or I'm very far from understanding what you want, or something is very wrong here.

Thanks diogo. Not fopen() but some api call right ? The only thing that is wrong here is me, feeling frustrated not knowing enough to code my own decent php. Mixing php between html tags - for each - echo complete tables, structures, li, ul, the api, etc. still a long way to go. I'm not born with a programmers mind but having seen processwires potential compared with other cms'es, and only understand simple php snippets, makes things even more wrong here >:( That said, and with this great forum, feeling a bit more relieved and carry on.

Link to comment
Share on other sites

The only API call you need is the reference to the field. In that case Ryan is using $story->body, because of the context, but in general you would use $page->body.

A piece of advice for learning PHP. Everytime you copy snippets of text, go to the PHP manual and check for all the methods used http://php.net/manual/en/index.php

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...