joh
Forum Replies Created
-
Forum: Plugins
In reply to: Using WP for article management?One (quite) easy way to do this: Use one category for your articles and configure WP to not display categories belonging to that category in the blog. Than add a hierarchical menu to your page with links to these articles. You will still have a blog (which shows up all postings not in that article-category) and parallel to that you have a set of postings (content articles) accessible only via the menu.
Not long ago I started to wrap up all of this into a plugin, but got distracted by Real Work.
Forum: Everything else WordPress
In reply to: Name Ripoff?Hi Anonymous,
even if phpWordPress would be a “rip-off” of WordPress this would be perfectly legal. WP is GPL-licensed and the GPL does allow that as long as the resulting software is also GPL.
The name issue: You should really rename your software. WordPress is quite popular and it is free, so your customers won’t be happy at all when they find a software for free on the web that has the same name and looks quite similar to the one they’ve paid for. Naming your software WordPress just confuses people. And this is already happening, obviously.Forum: Themes and Templates
In reply to: controlling the time stamp visibilityAdd a custom field to the posts you don’t want to display a date and then, in The Loop, check with an
if
for that custom field and if it’s there, just don’t display it…Forum: Everything else WordPress
In reply to: Front page ideaShould be easy. Just make sure that you limit your frontpage to three posts and then change the HTML in The Loop so that the posts aren’t in a single column but in three. Either use a HTML table or (better but more complicated) suitable CSS to do that.
Forum: Your WordPress
In reply to: my first blogLooks nice. But: You’re using a layout with fixed widths, so with a browser window actually wide enough to display the page reasonably but not wide enough for your specified widths one still has a horizontal scrollbar. You should either use relative widths for the columns or just a max-width.
And additionally there’s something I’ve never seen before: Each line in the actual posts seems to be an individual paragraph, so that they have a quite ragged look. Do you hit return on the end of each line in your edit form? Don’t do that, hit return just for new paragraphs, so the browser can figure out linebreaks within paragraphs on its own.Forum: Plugins
In reply to: Image in its own table cell?“In the post” implies it’s in the content and
the_content()
just puts out the content of the post… So you can’t have a php tag for something that is in the content.
What you could try though: Put the image(s) into a meta field and use something to build an img tag from that field. Don’t know if this makes sense layout-wise. Just assigning a class to the img tag and using some CSS to do with it whatever you want seems much simpler.Forum: Plugins
In reply to: Skipping posts in The Loop by category?Thanks! Also found this: https://faq.wordpress.net/view.php?p=55
Forum: Plugins
In reply to: format_to_postThen
format_to_post
is exactly what you need. When you get a ‘headers already sent’ error this means your function is echoing something. The function you hook into the filter shouldn’t echo anything, it should return the data as inreturn $content;
, notecho $content;
.
Or you have whitespace before<?php
or after the closing?>
in your plugin. Note that the plugins are loaded before anything is sent to the browser and if a plugin echoes data WP can’t sent HTTP-headers anymore.Forum: Plugins
In reply to: Get (single) article content by post title?Ahh! Thank you very much. This looks much simpler than what I would have written…
Forum: Plugins
In reply to: Get (single) article content by post title?Hmm, don’t see that… What I want to do is being able to create, edit and maintain pieces of HTML as normal articles and then insert them into the page (outside the loop) with a function that just grabs the HTML content of an article out of the database. I don’t want to use this instead of the normal way the blog looks and works but additionally to it.
So that I can for example have a text-block in a sidebar that actually is a short article ‘sidebar-block’ in the database by using<?php get_content_by_name('sidebar-block'); ?>
in the desired place in index.php.
And what I’m actually about is putting together the code for a CMS plugin. Having more pieces of the page (and things like menus) generated from articles pulled out of the database is quite a nice thing to have for that…Forum: Plugins
In reply to: Get (single) article content by post title?OK, if someone has an answer, please provide it ??
After looking at what actually happens when you point a browser atindex.php?name=my-great-page
I’m quite sure that there is no such function, documented or not.wp-blog-header.php
handles this and goes with no further fuss to building a database query. I fear I have to write my own get_content_by_page_name() function. Well, shouldn’t be that hard.Forum: Plugins
In reply to: format_to_postformat_to_post
is meant for filtering the posted content before it is saved to the database. As soon as you echo something in this hook, this will go out way before anything else is sent to the browser, breaking the page.
Note that this is basically the same with all filter hooks. Every function you hook in there is passed some variable and has to return it (maybe with altered content). Echo anything and it will happen at a point in the program flow that will quite surely break your site.
Maybe you should explain a bit more clear what you want to do?Forum: Plugins
In reply to: Filtering input instead of output?The filter hook
format_to_post
seems to do the trick just fine.Forum: Plugins
In reply to: Filtering input instead of output?The problem with directly going to the database from within a plugin is that you have to hook something in at the right moment, intercept the data being inserted in the db, convert it and actually insert it then. I do not see how I should do this. Well, there is a filter hook called “format_to_post”, which sounds as if it could be the right thing, but it is nowhere documented. I have to dive into the sources, I guess.
Forum: Plugins
In reply to: Dates prior to 1969You could hack around that by putting the date (which is obviously not the date of the posting anyway) into an custom field instead and use something like Custom Meta Display to display that date (which is just a string then) in an appropriate place or even in place of the actual date. Surely simpler than fixing such an fundamental limitation of timestamps…