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

Conclusion

The swallow-hack is meant to be a proof of concept. I think, a similar feature should be included in the core-classes of phpWebSite. I don't know enough about phpWebSite to judge, where it would fit in best.

I personally believe strongly in modularity and think, the swallow hack could be implemented a bit like the search box. Every module would provide a hook or two (inline-link or something) and the rest would be handled by the core classes.

Please, as always: share your comments, I'd love to read your oppinions!

Going even further

Ideas for further developement would include: nested swallowing, remote swallowing (swallowing other phpWebSite's stuff), give your swallow a name (Syntax: [swallow=...]id|title[/swallow]), honour escaping with \, ... the list goes on!

Downloading

swallow_0.5.tar.gz(1777), as of 2005-04-04 got ported to Article Manager 3 by Tony Oosterhoff. It also contains a bugfix for a bug found by Tja. Read this thread for details. Thank you!

swallow0.4.zip(1744), as of 2004-10-02 now honours the edit mode. You can edit swallowed links, articles, files and pictures right in place with a provided link!

swallow0.3.zip(1733), as of 2004-10-02 contains:

  • new "throat" breadcrumbs, for showing, how a certain link got reached. takes a list of link-ids, like in [swallow=breadcrumbs]1,2,3[swallow]

swallow0.2.zip(1726), as of 2004-10-02 contains:

  • new "throats" article and section. article provides a link to an given article, section provides the text of a given section.
  • all swallow methods are randomizable, [swallow=file-random]1,2,3[/swallow] would choose either show the link to file 1, 2 or 3 on each reload.

Since the hack is rather long, I've made it available for download: swallow0.1.zip(1763).

                     
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