[Home]UserHelp/Archive

UseModWiki | UserHelp | RecentChanges | Preferences

This page contains older questions, some with answers. See UserHelp for newer questions.


Question

Does anyone know how to pull this one off? I'm looking for a way to insert wiki into an internal web site, so that the wiki engine drives the creation of the body of the page. (We have intranet design standards that we need to follow. The default wiki design, of course, doesn't happen to overlap with them.) Currently, I can render the wiki through a frame by calling the src at the url for the wiki. However, what I'd like is a redirect for the entire wiki so that if any link within the wiki is targeted from any other site, and the browser hits the wiki, the site redirects to the wrapper and calls the wiki link within the body of the site, as the site is intended. Any ideas? -- MatthewSimpson

Sounds like a dual-mode wiki to me -- one wiki.pl in normal wiki mode to create the pages, and another htm.pl wiki engine stripped of wiki header and footer (no editing, etc.) pointing to the same page database for visitors to see. http://hytext.com/cgi-bin/wiki.pl (htaccess passworded) is the generator for http://hytext.com/htm.pl. On the same site, http://cgi-bin/wbt.pl is normal wiki for visitors to play with. Look at http://meatballwiki.org/wiki/WikiMutants and from that, http://meatballwiki.org/wiki/NakedWiki for ideas. There's another dual-mode wiki in the 'Tavi engine with the visitor access through http://allmyfaqs.com/wbt. I've used the naked wiki idea, with pages called into an IFRAME, on intranets with very good results. Non-HTML people handle all the site updating from the wiki side, and it looks like the normal corporate intranet from the visitor side, all with no upload/park/approve/release involvement from the IT people. -- JerryMuelver

Kinda... However, I really want to morph an intranet page so that it has wiki functionality.... Or, I'd like to morph a wiki so that it looks like an intranet page (with all the design specs, etc.) I'm not looking to have one wiki drive the content for another... I also don't want the wiki to run naked, or in a read only mode. I seriously want to put the full wiki functionality up on an intranet page. I've put a couple up already... and am now just trying to fit them into the design specs (wrapper) for the intranet. Something tells me I need to do a bit of reading to learn about NakedWiki? and IFRAME (I've seen you make reference to IFRAME on a couple of other pages here). You can tell I'm not formally trained in the genre of developing... just a cheap hack... perhaps high-end user. ;-) -- MatthewSimpson

Hmmmmmm... looks like I need to create an IFRAME and src= url to wiki inside that frame... and now I need to figure out how to make every link/url rendered by wiki call the page with the IFRAME around it first... or figure out to have the wiki engine know that it should fit within that IFRAME. Hmmmmmm..... Any ideas on how to do that? -- MatthewSimpson

Here's some IFRAME stuff for you -- http://allmyfaqs.com/faq.pl?IFRAME (another wiki, of course....) -- JerryMuelver

Okay... looks like I'm starting to get to some kind of a solution. I could:

Outcome - This was not an option. I learned that anything with frames can be broken. - With the frame, the default wiki will load off site web pages into the frame. So I tried WikiPatches/OffsiteNewWindow to keep offsite stuff from loading within the frame. I found that the patch also creates a new window when you don't want it to (i.e. when using the same and preview buttons, or when doing a search)... I then modified that patch so that it would target=_top... This results in making sure that offsite stuff is loaded outside the frame... But it also breaks the frame when you don't want it to (i.e. when using the same and preview buttons, or when doing a search).

Outcome - The author wrote back and gave me his code. I can't tell if it works or doesn't work. I could not get it to work, and neither could my colleague, who actually knows how to code Perl. I should post this if anyone is interested to take it up.

Outcome - When presented with this challenge, my colleague took one look at the situation and essentially embedded a header and a footer inside the wiki code. He needed to change all " into '. But once he did that, he got it to work. Now we have a wiki working inside another design created by an Html header and footer. I think he's going to take another look at WikiPatches/HtmlHeader to see if he can use this to modify what he did. Our situation is that we need to show a customized grey bar going down the right hand side of the screen t meet our internal design standards. So a header-foot combination accomplished that. -- MatthewSimpson


Question

Does anyone know how to make all links within a wiki that reference and external site (i.e. any link that points to something other than http://www.foohome.com/cgi-bin/wiki.pl?...) do something tantamount to target=_blank or target=_top (i.e. launch the site in a new browser window or so that it takes over the browser at the top level? (Now that I'm putting wikis into frames, I don't want to accidentally load someone elses site within that frame). -- MatthewSimpson

Hey Matthew! Check out the patch you just found! WikiPatches/OffsiteNewWindow (And keep talking to yourself! And keep answering your own questions!) -- MatthewSimpson

Hey Matthew! You also learned that this patch doesn't really work (see above). -- MatthewSimpson


Question

I notice that on every WikiPage? I can choose to Edit page I'm on, but not on Preference page. Why is that?

Answer

The Preference page is a generated page, unlike the other pages on wiki which have only static content in them. The page is directly generated from code and so it is not editable.


Question

Hi! I'm new to Wiki technique and I need to create a WikiStartPage? which contain a few links. One link(called like New Project) links to new WikiPage? that should look simular to Prefereces. Then when users fil in information on this page the link to this page should appeare on WikiStartPage? but not called as New Project. This link should instead been called same as the name user filled in as projectname, like SchoolProject? or something like that.

Maybe I'm making this more complicated an it is but I just can get this right in my haed...

My question is: Is this posible? In that case where do I write code for New Project Page? Can I have more than one configuration? I ask this because I would like WikiStartPage? to have different links on top and botton as rest of wiki pages....

Thanks! \Elma


Question

I have a wiki installed within an intranet environment in which many of the users have their photos hosted inside of a database behind a web application. When I right click on the photo and select properties, I can see the URL to the photo. However, the extensions do not end in .jpg or .gif. Instead they end with a long run of numbers (something like http://whatever.whatever2/nth_whatever/D2649153725402) If I point directly at a photo URL within the browser, the photo is rendered on the screen. However, if I point to the photo in usemod, usemod doesn't recognize it as a photo because it doesn't have an extension at all, much less .jpg or .gif. If there was an extension, I know I could simply add the extention type to the script. But there's really nothing that looks like an extention. QUESTION - Is there a way to get usemod to render the photo on the page? -- MatthewSimpson

Answer

Yes, but only if you are able to formulate a regexp that clearly classifies a URL as being an image link (eg. contains the subdirectory '/images/'). You won't be able to do anything though if the urls for images are indistinguishable from urls to regular pages. -- EricScheid

Thanks. Funny you should mention that. Each URL has some string common to all URLs (I think maybe even '/images/' is in every URL (how did you know, guess?))... I'm not really a programmer and have never even installed a patch. Is formulating a regexp something more complicated than a configuration of the script? Any suggestions on what a guy like me should try? -- MatthewSimpson

You want to patch the UrlLink? subroutine ...

sub UrlLink {
  my ($rawname, $useImage) = @_;
  my ($name, $punct);

  ($name, $punct) = &SplitUrlPunct($rawname);
  if ($NetworkFile && $name =~ m|^file:|) {
    # Only do remote file:// links. No file:///c|/windows.
    if ($name =~ m|^file://[^/]|) {
      return ("<a href=\"$name\">$name</a>", $punct);
    }
    return $rawname;
  }
  # Restricted image URLs so that mailto:foo@bar.gif is not an image
  if ($useImage && ($name =~ /^(http:|https:|ftp:).+\.$ImageExtensions$/)) {
    return ("<img src=\"$name\">", $punct);
  }
  return ("<a href=\"$name\">$name</a>", $punct);
}

The way that subroutine works is that it is a series of pattern tests with premature exits. It tests for a file:// url, and if found it emits the html required for a link. Then it tests for an image url (must start with http/https/ftp, ends with any of the image extensions defined in the globals), and if found emits the html required for an image tag. Finally, if the subroutine hasn't already returned earlier, it emits the html for the URL as a link.

What you want to do is insert another test+return clause just before the final return

  if ($useImage && ($name =~ /^(http:|https:|ftp:).*\/images\/.*$/)) {
    return ("<img src=\"$name\">", $punct);
  }

Sounds like you might need help with writing the regexp. Please provide a valid and real example URL (you may obfuscate the domain name part if you want), and indicate which part of the URL signifies that it is indeed an image URL

This was so awesome! That was just enough information for me to take to a colleague here. We checked the URL and figured out the the unique string was '/userimages/' took your recommendation above, patched it in, and then BOOM! It worked! :) Now everyone will be able to use their picture! Many thanks!! -- MatthewSimpson - April 26, 2002

Follow Up - Uh oh, problem. It seems like my friend edited the existing test+return clause instead of inserting another one in. Now the original URL form for .jpg and .gif don't work. We'll have to try again on Monday. But it seems that if we followed your instructions carefully and "insert(ed) another clause just before the final return, it would have worked 100%. -- MatthewSimpson


Question

I am trying to install UseMod on my Tripod web site. They give me a cgi-bin directory, where I place CGI.pm and CGI::Carp.pm modules. When I access the script it returns the following error:
Can't locate CGI.pm in @INC (@INC contains: .) at ./wiki.pl line 301
Does anyone have a way to solve that?

Answer

It sounds like Perl is looking for those modules in its standard INClude library path -- which won't include the cgi-bin directory. Try putting something like this near the top of your script:
use lib "/path/to/your/cgi-bin";

Question

How do I have an InterWiki link without the brackets, viz

[UseMod User Help]

a la UseMod:UserHelp? Or do you mean WikiPatches/UnBracketText

Thankyou, I meant the latter. I wanted the "non wiki" description with underlying link.

Question

I am trying to get csdiff working under Win NT4 with ActivePerl. See ComponentSoftware for details!

Question

I want to achieve this effect (without the fixed font)
 Date:        2002 Feb 26
 Venue:       Conference Room
 Time:        10am
Any suggestions? tabs ?

This would require a table in usual HTML syntax, so see WikiPatches/TableSyntax for discussion re introducing table syntax into wiki editing. As an interim alternative, you can achieve a similar effect (content-wise, not visually) with definition lists (using colon/semicolon syntax, see TextFormattingRules).

Questions

When will we see version 0.93?

Is there any possibility of a sourceforge version, this seems to be working well for MoinMoin?

Could you post the version of the configuration files (presumably not the default) used by UseMod and MeatBall?

Question

Why are my recent changes in chronological order, the ones on UseMod in reverse chronological? Is it to do with the RecentTop minor option?

I'll answer my own question, it is related to my preferences eg [Preferences], but having said that the default seems to be different.



UseModWiki | UserHelp | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited November 6, 2023 8:19 pm by MarkusLude (diff)
Search: