Blog posts to separate pages? - expressionengine

How can I have blogs on my expression engine site post directly to a new page with a url? Right now my blogs are static and taking up entire pages (up to 10 blogs on a page) Is there a way to automate this so that every blog that is posted automatically is set up on it's own page with a unique url?

There are a bunch of ways to do this. EE has good documentation and this is pretty well covered. I think you also get something like this pre-built for you in the default install.
In a nutshell tho what you probably want is an entry template.
So let's say you have a template now called "blog" and the template called "index" that you are now using for your multiple blog listing.
In your "blog" template group you want to create a new template called say, "entry". Then you want to build a link from each entry in the index to the individual entry page. The path would be something like /blog/entry/{url_title}.
There's more to it than that but that but that should be enough to get you started. If you have more questions you can ask another question and show us what you have tried.

Related

Nodejs URL modifications for SEO purposes

I have a working App built on Nodejs + Drywall + Openshift, sorry it's in Arabic. Basically, I am looking to improve on the service, but having a major roadblock. The site is a classifieds site and I need to optimize it for SEO, however, my links to ads are shown like this...
http://yobyobi.com/ads/show/55c9ff9dcf68970612ba2d38
55c9ff9dcf68970612ba2d38 is the Ad ID on my mongoDB, I do also have a record for the indicating the date and the title of Add combined "Sun-Nov-22-2015-8-pm-2007-camry-for-sale", the goal is to make the URL pretty and understandable by search engines. The end result I want to accomplish is one of the following:
yobyobi.com/ads/show/55c9ff9dcf68970612ba2d38/Sun-Nov-22-2015-8-pm-2007-camry-for-sale
yobyobi.com/ads/show/Sun-Nov-22-2015-8-pm-2007-camry-for-sale/55c9ff9dcf68970612ba2d38
yobyobi.com/ads/show/Sun-Nov-22-2015-8-pm-2007-camry-for-sale/
Now, option number 3 would be ideal, but would slow down my application if I have to search by Ad title instead of Ad ID. Similar to what Stackoverflow is doing (attached pic)
Stackoverflow example
Code
app.get('/ads/show/:id', require('./views/account/ads/index').read);
The above line returns the Ad for me with all the details including the title that I want to use, but the problem is that I cannot change the route URL after I receive the title.
I am not sure if this module would help in whatever I am trying to do it's called "named-routes"
Has anyone ran across this problem? If so can you share some insight on how to best tackle the problem?
Thanks in advance,
well, the solution was dead simple, do the following:
add * as a wild card like this
app.get('/ads/show/:id/*', require('./views/account/ads/index').read);
now when you create the links to the post, attach anything where the * is and it should show the same Ad without breaking the page.
Cheers

Tumblr.js official javascript/node API "link" posts with image, title, body

I'd like to be able to post link posts on a blog exactly the same way as if you were to go on the regular user interface and choose a "link" post and paste in a URL. It automatically grabs the image, sizes it, sets the title and a body/caption.
How do I go about doing this with the tumblr.js api wrapper?
I already have the API working so I do not need to know how to connect/post link articles. I am specifically interested in being able to add link posts that look/work exactly like the link posts you make as a regular user on their web interface. Using the API to do a link post just throws in the title. Using a photo post doesn't allow you to do a separate title/body. I'd love it to look like it does on the website when you paste in a link post and have the tumblr api/feed return it the same way too.
I got a response via github issues that explains that what I was attempting to accomplish is not available via the API. It can only be done using a tumblr client.
https://github.com/tumblr/tumblr.js/issues/41#issuecomment-135588952

Is it possible to scrape any given URL with NodeJS?

est I'll preface this by saying this is something that is new to me and is purely a learning exercise, so please excuse any naivety.
I've been looking through some articles on scraping and it seems that NodeJS, ExpressJS, Request and Cheerio would be my preferred method as a Front-End guy who is comfortable with JS/jQuery.
All the articles I've read so far focus on scraping data from a specific website in the absence of an API, whereas what I am looking to achieve to start with is a tool which takes any given URL and returns a true/false for a list of which common libraries are being used and which social networks are linked.
For example, a user enters a URL and the results return a "This website uses jQuery, MooTools, BackboneJS, AngularJS, etc" and "This website is linked with Facebook, Twitter, etc". Somewhat similar to Tregia: http://www.tregia.com/process?q=http://smashingmagazine.com.
Is my chosen setup (above) appropriate or limited to only scraping specific pages due to CSS selectors?
You should be able to scrape all pages and then find their tags and read which tools they're using (although keep in mind they may have renamed them [ex angularjs3.1.0.js - > foobar.js] to keep people from knowing their stack). You should also be able to get the specific text within the rest of the tags that you feel relevant as well.
You should try and pay attention to every page's robots.txt as well.
Edit: You probably won't be able to scrape "members"/"login only" areas of sites though.

How to link to another liferay page

I'm trying to figure out how to link to another page within the same liferay site.
Obviously I could hardcode the url in my portlet's view but I'm worried about having to update all of my portlets in case the friendly url changes in the future.
I know the name of the page I'm trying to link to, but what if the page name changes too?
I've found infinity of classes that have methods that return friendlyUrls, such as PortalUtil, LayoutLocalServiceUtil, and even LayoutFriendlyURLLocalServiceUtil, but they all require parameters that I'm not sure how to obtain.
Is there a standard way of obtaining friendly urls in liferay?
If you want to link to another Page, you can either use LayoutId or friendly url names.
Both are unique for each companyId, so you are going to be pretty safe using them.
You can set the friendlyUrl as a PortletConfig parameters, so you can set them on portlet Level, and you won't have them hard-coded in your Portlet. Alternatively, you can also save them as custom params in portal-ext.properties (will apply for all portlets of that portal).
Now, that's a lot of code for this, so if you're dealing with specific problems, like creating Portlet Configuration or Reading portal-ext.properties, or creating renderUrls programatically, you should start new questions

How can we enable user's thumbnails on their drupal content?

I am going on making a Drupal site matches with my requirement. A requirement describes that on each node, such as Blog or Forum, except publisher's name and published date below the node's title, should show the user's thumbnail (similar to avatar in Facebook or Twitter) too.
I thing there is an existing module for this requirement. but I couldn't find it.
Could you tell me how to do this? some guideline or link to an example? it would be nice if you can tell me the module that is able to do this thing.
you wany to enable picture support: http://drupal.org/node/22271
and in addition, you probaly want to change the theme to call
theme('user_picture', $account);
where you want to display the picture (where $account is the account object of the user that is posting the node/comment)
the corresponding template file is user-picture.tpl.php

Resources