Loading...
 
Features / Usability

Features / Usability


Display wiki page as plain text?

posts: 3665 United States

How can I display the contents of a wiki without the wiki controls (i.e., as plain text)? For example, I want to strip out the wiki controls when:

  • The site search function returns a wiki page
  • Showing a wiki-formattted event in the calendar in LIST mode


Thanks,

-Rick

posts: 3665 United States

Maybe I'm asking this question the wrong way....

For certain pages (such as search results) I want to strip out the wiki syntax. For example, instead of a search result appearing as:

!This is a heading with ''italic'' and __bold__ text.


I want the search result to simply appear as:

This is a heading with italic and bold text.



This is much easier for users to read. How can I strip out all the wiki controls?



> How can I display the contents of a wiki without the wiki controls (i.e., as plain text)? For example, I want to strip out the wiki controls when:
> *The site search function returns a wiki page
> *Showing a wiki-formattted event in the calendar in LIST mode
>
> Thanks,
>
> -Rick


posts: 4656 Japan

> How can I display the contents of a wiki without the wiki controls (i.e., as plain text)? For example, I want to strip out the wiki controls when:
> *The site search function returns a wiki page
> *Showing a wiki-formattted event in the calendar in LIST mode

This seems like something that should be taken on by the Tiki devs — having wiki code show up as text in search results is not a good thing. This must be on the list for a future solution, but I don't know when. Seems like the way to go would be to wiki parse the wikitext that is displayed in search results, rather than to strip the syntax out, but that's not my call to make.

In the meantime, I don't know a way to get the clean results you want. You can modify searchlip.php to limit the amount of a page that's quoted for the search results sample, which would reduce the problem of syntax showing, but would also reduce the usefulness of the search.

-- Gary

posts: 3665 United States

It is more than just the search results, though. Since you can include wiki syntax in calendar events, when viewing calendar events in LIST mode, I'd want to remove the coding as well.

-Rick

> > How can I display the contents of a wiki without the wiki controls (i.e., as plain text)? For example, I want to strip out the wiki controls when:
> > *The site search function returns a wiki page
> > *Showing a wiki-formattted event in the calendar in LIST mode
>
> This seems like something that should be taken on by the Tiki devs — having wiki code show up as text in search results is not a good thing. This must be on the list for a future solution, but I don't know when. Seems like the way to go would be to wiki parse the wikitext that is displayed in search results, rather than to strip the syntax out, but that's not my call to make.
>
> In the meantime, I don't know a way to get the clean results you want. You can modify searchlip.php to limit the amount of a page that's quoted for the search results sample, which would reduce the problem of syntax showing, but would also reduce the usefulness of the search.
>
> — Gary


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting