Recent Topics

syntax problems: article titles plugin

Started by on Jan 31, 2009 – Contents updated: Jan 31, 2009

Jan 31, 2009 18:21    

I've been trying to install the article titles list plugin described at http://forums.b2evolution.net/viewtopic.php?p=76950#76950 .

After cutting and pasting code and uploading resultant file, I got a series of syntax errors about the closing braces in lines 167, 171, and 172. I commented them out and closed them all on the last line, after the closing php tag.

Now I get this message:

Fatal error: Call to a member function on a non-object in /home/wordturn/public_html/mcgmquakers/plugins/_article_titles.plugin.php on line 165

Here's line 165:

<a href="<?php $Item->permanent_url() ?>" title="<?php echo T_('Permanent link to full entry') ?>" ><?php $Item->title(); ?></a><br /> 

Has anyone successfully used this plugin? Any ideas what is going wrong for me here?

Context: I need SOME way to make my aggregator blog (=home page) list only the titles (or titles and one or two lines) of the fully displayed posts in the other blogs. I'm not even sure that is what this plugin does--in contrast to being a sidebar widget or something. I am running b2evo 2.4.6.

Feb 07, 2009 17:29

Hi martha. The lack of a zip and a readme for that plugin is very bad, but I think I figured out the problem: whitespace.

Trust me, it's there.

Open up the plugin file in your favorite editor and you will probably see a single space BEFORE the first <?php and another one AFTER the final ?> - get rid of them.

This seems like a nice plugin but you gotta kinda figure out what it does. So far to my mind it is an advanced version of the "posts" plugin because it does pagination the way your blog does. OTOH it doesn't have a title for the block on your skin so that's kind of a downer.

Anyway that entire plugin has been plagued by whitespace. A .zip of the file would probably fix that. A readme to explain what it will do and what you can do with it would really make it shine!

Feb 11, 2009 04:18

Hi EdB, thanks for the replies, both here and in the older thread!

I did try looking for extra white space (as per older thread), but I didn't find any. (I had already learned that white space can mess things up, and to be careful when cutting and pasting.) I tinkered a little more, and my efforts just changed the error message and the reported location of the errors. I gave up, at least for the time being.

I'm currently running a whole separate skin just for my aggregator blog, identical except for a different posts.main.php file in which the actual post is not called, just the title--see http://www.mcgmquakers.org. This seems like lot of duplicated effort, and maybe slows down loading too. Let me know if a less clumsy way of doing this occurs to you!

Feb 11, 2009 11:11

Isn't this just the linkblog plugin ? or am I missing the point ?

¥

Feb 11, 2009 14:56

It's different than that. More like the "posts" plugin only a bit beyond. Lemme see if I got a link for ya... Okay take a look at [url=http://wonderwinds.com/raw_246/index.php?blog=1]domain.com[/url] and visualize the sidebar with your eyes. Notice the untitled bit between Blogroll and Contents? That's what this plugin does. So it is basically like the posts plugin in that it links to posts (but not a URL in a "link to" part of a post), and it offers pagination.

hmmm... so ... it is showing me a link to the posts on the page I'm on? I guess if it was way up high on the sidebar it'd be like an index of your current page?

Feb 11, 2009 15:03

Well, I want to display (1) in my aggregator blog (=home page) (2) the titles only (3) of posts displayed in full in my other public blogs, and I want to display those titles (4) in the posts (=main) area, not in a sidebar. (If you are getting these, you are getting my point.) (Probably would help to peek at my site (see link above), both home page and another chosen at random. I've got the EFFECT I want, but by a method that seems clumsy and slow.)

So far as I know, linkblog will display post titles in a sidebar (or other widgetable area). But the posts area is not widgetable ... ? or at least not controlled from widgets. Some plugins work with posts area ... can I deploy the linkblog plugin in the posts area of my page?

I guess one could use posts.main.php to make the "main column" (same size etc as posts area in the other blogs) into essentially another sidebar, and then insert widgets to one's heart's content.... Or maybe I could make that "main column" widget-ready, while still calling posts as well?

But, if my control depends on posts.main.php being different for that one page, do I then need a separate skin so the page knows which posts.main.php to use? (That's what I'm doing now--tho the mod is to display just titles.)

---

Just got EdB's latest--no, I'm not trying to do ANYTHING in the sidebar--see beginning of this post. Sounds like I'm barking up the wrong tree in looking at article titles plugin...??

Feb 11, 2009 15:10

Currently you will have to build a custom container *in* your posts loop in your skin in order to use any widget (including those that come from plugins) in your main posting area.

martha this plugin is possibly good for you, but you have to hack your skin and add a custom container. Oh and the hack will have to chuck out the posts loop because it is what puts all the various bits of a post there.

So does your main blog have it's own skin, or does it share a skin with other blogs? Either way your goal is achievable, but knowing lots of bits makes it easier to help craft this up.

Feb 11, 2009 15:39

Main (aggregator) blog shared skin with other blogs UNTIL I realized I could hack posts.main.php to display only titles. THEN I renamed the skin so it would use the different posts.main.php for that one blog. Main blog still shares look with others--would make life easier to go back to a single skin for all, if possible.

My "hack" of posts.main.php was to comment out: ---POST CONTENT INCLUDED HERE--- block, along with author, tags, and comments, leaving only title, date, and categories. While full post and most of the other standard info is displayed in the subject blogs.

I'm not stuck on making article titles plugin work for this. Would like to go back to a single skin for the whole installation. And I have multiple reasons for being interested in a custom container in posts area, and/or making posts area "widgetable."

Feb 11, 2009 16:02

Okay cool. Custom containers is beyond me right now cuz I'm a tired little boy who wants to go beddybye. Praps someone will splain how to get 'er done while I sleep off another day of drudgery mining salt for the imperial overlords. If not I'll try though I'm not so good at it cuz I just hack.

BTW in a single-skin model without a custom container you can tell it something like this:

$make_the_title_whatever();
if( $blog == 1 ) {
// yeah the title is enough on blog one
} else {
// beyond here be the rest of the posts loop
// Yargh!
}

A custom container is probably easier ;)


Form is loading...

Secure CMS – This forum is powered by b2evolution CMS, a complete engine for your website.