checking if nodes exist
chrism2671 - March 5, 2008 - 19:23
| Project: | PEAR Wiki Filter |
| Version: | 6.x-1.0-beta1 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
How could you implement red links for nodes that do not exist, much the same way as in mediawiki?
Cheers,
Chris.

#1
This would be an excellent feature to add. Pear Wiki is great, but it would be nice if visitors knew some of the links do not yet have content. Is it in Pear Wiki where this could be implemented, or would it have more to do with Wikitools? Any ideas how to make this happen would be great to hear.
#2
I've actually made this work on my site, but it required a fair bit of hacking. I edited the pearwiki parser at the point of link creation to do a node_load on the title. If it found a node, it would set one css class, if it didn't, it would set another. That way I could set two different colours based upon it.
Now this is a little cpu intensive, and my site is very busy. These pages are cached, so if a new page is created, it can take several hours for the link to actually change colour- but this isn't really a big deal in the scheme of things.
#3
That sounds like the best idea I've heard so far for tackling this. It's amazing it hasn't come up before. Kind of odd to have links with no content be the same color as though with content. Could I see the code you used in the pearwiki parser?
#4
@ #2
i am interested in your solution. any hints which files to hack?
thx