skip to main content

kiesler.at

Swallow Hack 0.5 for Article Manager
updated by rck, 2006-04-23

Didn't you always think about a CMS that's more tightly integrated, than phpWebSite? Didn't you always wonder, if it would be possible to use the same pictures all over the place, include download links in an Article? Or maybe use the links right from your Link Manager, thus having one single instance to administer, and not loads of different articles?

0.5 is a port of 0.4 to Article Manager 3 by Tony Oosterhoff. It also contains a bugfix of a bug found by Tja. Read this thread for details. Thank you!

                     
1 | 2 | 3

The idea

I always liked the idea of getting things together. Coffee and milk, bread and butter, and so on. So why not combine the Article Manager more tightly with other modules? After spending loads of time hacking around in phpWebSite, I finally had the insights neccessary for such a hack.

Introducing the Swallow Hack.

An example

Using the swallow hack is straight forward. What, for example, if you want to link to the phpWebSite Manual or Sharondippity? Easy: You just write down a swallow link tag, it goes something like [swallow=link]link-id[/swallow].

A couple of pictures

Another example. What, if you'd like to put not only one but a couple of pictures in a Section? You couldn't with article Manager, until before this hack. Have a look:

simply use [swallow=thumbnail]picture-id[/swallow].

(greetings to the security team, by the way.)

Linking files

What about linking files? The phpws_sheepset.zip(2182) or the phpws_sheepset_0.2.zip(2160), for example? [swallow=file]file-id[/swallow] will do the trick.

This little link by the way was the main reason for writing the whole hack... I wanted to provide direct download links!

                     
1 | 2 | 3



RSSComments - Make a comment
The comments are owned by the poster. We are not responsible for its content.
  • Interesting idea

    Posted on 2005-01-15 04:44:01 By Anonymous

    You could expand this by not patching article manager and just using a PEAR BBCode filter, then it would be available to all modules, be oblivious to module or phpwebsite upgrades and be a lot more useful. Not everyone uses Article Manager.

    Shaun aka Singletrack

    [Reply ]

    • Re: Interesting idea

      Posted on 2005-01-17 18:06:11 By rck[110]

      I know, I know. That's also the reason why aDarkling doesn't include it in Article Manager. I'm right busy at the moment (end of term, health module update, visitors module, of course rdoyles membership module design document...).

      But I know a lot more about phpWebSite then I did back when I did the patch. So I guess, I could do it with bbcode. I want to have that myself for more modules, putting it right in the core, so to say, should be pretty neat. We will see...

      [Reply ]

  • Call me an idiot but...

    Posted on 2005-04-16 07:39:52 By Anonymous

    This seems wonderful, but I don't seem to have got it working - can you do an idiot check for me? I've downloaded the hack, & replaced my version of Section.php with the hacked version. Then I've gone to an article and typed the following text into the text section of my Article Section (where "5" is the article-id of an article that *does* exist): [swallow=article]5[/swallow]. However what appears is the text I entered, not the article...Am I doing something wrong here?

    [Reply ]

    • Re: Call me an idiot but...

      Posted on 2005-04-16 08:18:40 By Anonymous

      D'oh - I was putting the swallow tag in a pagemaster page - not an article...Mind you, when I installed the swallow version of Section.php, I was unable to edit an article - the edit text area did not appear on the page until I restored the old Section.php...any thoughts there?

      [Reply ]

      • Re: Call me an idiot but...

        Posted on 2005-04-16 10:21:27 By rck[110]

        changed On 2005-04-16 10:21:53 Edited By rck (reason: )

        Which Article Manager Version are you using? And which Swallow Hack Version?

        [Reply ]

        • Re: Call me an idiot but...

          Posted on 2005-04-17 18:40:31 By Anonymous

          You were right...I had been using a pre v.3.0 Article Manager (with Swallow v2.6)...upgrading to v.3.0 resolved the issue. Sorry for bothering you sad

          [Reply ]

          • Re: Call me an idiot but...

            Posted on 2005-05-21 01:17:04 By rck[110]

            changed On 2005-05-21 01:17:18 Edited By rck (reason: )

            To cite Sharon: "I'm here to help smile"

            [Reply ]

  • Extra option

    Posted on 2005-04-22 11:15:16 By tonynl[8]

    René,
    sometimes the title of the article or link or photo or document or whatever is not exactly what I want to show when using swallow. Maybe it's an option not only to give the id as parameter but also, optionally, a title (like [swallow=link]15, OptionalLinkTitle[/swallow].
    So when title is empty the name of the swallowed item is used, else the title. What do you think about this?

    [Reply ]

    • Re: Extra option

      Posted on 2005-04-23 22:55:01 By rck[110]

      I've planned something similar long ago and think I've even mentioned it in the article. Right now I see time slipping through my hands and should really carry on my study and things. Also, we're running a project were we could include a feature like that, remember?

      [Reply ]

  • No Subject

    Posted on 2005-05-09 15:28:51 By DnOlvrB[2]

    Good stuff. To answer your original question here: yes I have thought about tighter integration, but not in this focused a way. How to achieve it, while preserving modularity is something I'll have to ponder awhile...

    [Reply ]

    • Re:

      Posted on 2005-05-21 01:16:13 By rck[110]

      One word: Metadata. Unified Metadata (or the lack thereof in phpWebSite) would be the central aspect of all integration attempts. The Swallowhack is a step in that direction, it tries to unify access to thing.

      The next step is the Trackback I've implemented. But it got very clunky, why I didn't release it. I might do a commercial "Metadata" module that does Trackback as an added bonus, together with a more generic Swallow hack approach. I've been thinking about that for quite some months now but can't grab it completely. Who knows, maybe some day...

      [Reply ]

RSSAll Articles
2008, 2007, 2006, 2005, 2004

What's Related

Article Manager

Hacks

Latest Updates

AdministrativeTexts
updated by freddiemac1993, 2013-06-14
wiki

Re: adventures
created by brittdavis10, 2012-02-23 (1 rply, 3 views)
thread

Re: how to run phpwebsite...
created by alexander, 2011-08-25 (2 rpls, 3607 views)
thread

Re: Forum tags
created by HaroldFaragher, 2011-08-22 (3 rpls, 8488 views)
thread


Zu den KO2100 Foren