[drupal-devel] ann: any node can be blog : remove type "blog".
menesis
gediminas.paulauskas at gmail.com
Fri Mar 18 14:51:53 UTC 2005
Nice. Just yesterday I wanted to post a picture to a blog and figured
that the only way to do this is to manually create image node and
insert img tag (or use img_assist, or htmlarea), but then I lose
ability to view the image at different sizes. With your rewritten
module I could do that for single image.
I haven't tested, but looked briefly at queries as you asked... You
use LEFT JOINs where you should use INNER JOINs. That is, a query
snippet
FROM {node} n LEFT JOIN {blog} b ON b.nid = n.nid WHERE b.nid
gives same results as
FROM {node} n INNER JOIN {blog} b ON b.nid = n.nid
I'm not sure about performance difference, but that's what inner joins
are for - to select rows which are in both tables.
On Fri, 18 Mar 2005 14:12:21 +0100, Bèr Kessels <berdrupal at tiscali.be> wrote:
> Hi all.
>
> I rewrote blog.module to become a container, something like book outlines. In
> these files, there no longer is a blog type node.
> With a checkbox (see screenshot) users with the correct permissions can add
> any node to their blog. Feel free to try, also feel free to improve these
> files, just mail me if you commit changes.
> http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/ber/blog/
>
> Some notes, and maybe todos:
> I decided to remove the "blog this" funtionality completely. If we do blogs
> like this any-node-idea, the blog this should be handled by either
> node_aggregegator, or by a simpler feed_to_node.module.
>
> I have been thinking of a nicer way to track the nids that are in a blog. Now
> I introduce a new table with only one column! That is not very nice IMO, so
> if anyone knows better options, please let me know. FWIW: if CCK hits core,
> this problem will be solved, I guess.
>
> If a sql Guru would be so friendly to look at my LEFT JOINS and other queries,
> that would be great. They are as good as i can get them, but I figure someone
> with more knowledge in this might be able to improve the queries a little.
>
> I tried not to introduce any new functionality, nor remove any (unless for the
> blog this). The module is about as big as it was (~2 more or less), and will
> perform the same, afaiks. But benchmarks are welcome, I do not know how to do
> that.
>
> Regards,
> Bèr
> --
> [ Bèr Kessels | Drupal services www.webschuur.com ]
>
>
>
--
menesis
...pasikeite email: gediminas.paulauskas at gmail.com
...pasikeite mobilus: +37063349389
More information about the drupal-devel
mailing list