Blank pages will happen because there is a php error that blocks the site from working. You can look at your apache error log, or similar, or turn on error reporting (bad because people can see what is wrong with your site and exploit it).
> I put the type at the end because of the line you had: > > elseif( isset($args['1']) ) $link = $args['1']; My line means: If the "link" option is defined, use the "link" option (link=). If the link option is not defined, use the first argument (without an option). So it uses "link=" first, and if that does not exist, it uses the first non-= argument. Well done! I was going to extend my thing to be able to use as [(include)] later, as well. Lots of things one could do to make it pretty and useful. On Aug 30, 10:02 pm, Kevin <[email protected]> wrote: > While my adjustment works... I am getting a really weird side effect > from the plugin. > > With the plugin installed (or just in the plugin directory not > installed) I sometimes get a blank page when moving around the site, > even for pages that don't use the plugin. > > I'm guessing it has something to do with the format of the plugin > code, but am not really sure. It is very strange. If you hit refresh > when it does it, the page shows up just fine. > > When I uninstalled the plugin, the issue persisted until I physically > removed the plugin from the plugin directory. Then the Wiki worked > like it has been all of the two days I've been playing with it. > > I've actually got other things I'm supposed to be working on to day > (been playing too long)... so I will get back to this. > > DrunkenMonkey... thanks for the script as it gave me more insight on > how this stuff works. When I was exploring some of the new features, > I found that the tutorial section of the BoltWire wiki site was > basically offline. I don't know how similar this is to the way other > wiki's work so I don't know what other references I can use. > > On Aug 30, 12:38 pm, Kevin <[email protected]> wrote: > > > I gave this a shot... > > > <?php if (!defined('BOLTWIRE')) exit(); > > > function BOLTFfloat($args, $field) { > > ## [(float [side=SIDE] LINK)] > > ## SIDE = the side to float the image > > ## LINK = the image to include. Same behaviour as ^img:LINK^ > > ## TYPE = internal external > > > $FLOATDIV = '<div class="t%s">%s</div>'; > > > $side = 'right'; > > $type = 'internal'; > > $link = ''; > > > if( isset($args['side']) ) $side = $args['side']; > > if( !in_array($side, array('left', 'right')) ) return "error: > > illegal side argument"; > > > if( isset($args['link']) ) $link = $args['link']; > > elseif( isset($args['1']) ) $link = $args['1']; > > > if( isset($args['type']) ) $type = $args['type']; > > if( !in_array($type, array('internal', 'external') ) return > > "error: > > illegal type argument"; > > > if ($type == 'internal') { > > $result = sprintf($FLOATDIV, $side, BOLTMuploads("img: > > $link")); > > } else { > > $result = sprintf($FLOATDIV, $side, "[^$link^]")); > > } > > return $result; > > > } > > > Used like: > > > [(float side=right link=http://www.tnet.com/images/tnet-dimenet.gif > > type=external)] > > > First try.. seems to work though I had to use link=. Should shorten > > the type to int and ext. > > > I put the type at the end because of the line you had: > > > elseif( isset($args['1']) ) $link = $args['1']; > > > wasn't sure how to deal with the possible position issue if the type > > and side arguments which can be optional were not there. > > > On Aug 30, 12:07 pm, Kevin <[email protected]> wrote: > > > > Interesting... > > > > Wow... this gives me a bit more insight on how these things work. > > > > Last night I did figure out how to do it using... > > > > <span class="floatright"> > > > [^http://www.tnet.com/images/tnet-dimenet.gif^]</span> > > > > with floatright being: > > > > .floatright { float: right; margin-top: 10px; padding-right: 5px; } > > > > Not as complete or as elegant as your solution though. > > > > I just quickly tried the same with your code: > > > > [(float side=righthttp://www.tnet.com/images/tnet-dimenet.gif)] > > > > But got Invalid file. I'm guessing it doesn't know how to deal with > > > the external link (assumes I guess a local attachment) > > > > Will need to look at the code to see if I can figure out what is going > > > on. > > > > Still catching up on how things work as I am a complete Wiki Newbie. > > > > On Aug 30, 11:15 am, DrunkenMonk <[email protected]> wrote: > > > > > mmkay. > > > > > Ignore my above posts. See the > > > > plugin:http://boltwire.com/index.php?p=solutions.css.float > > > > > If you put the php files in your plugin directry, and activate the > > > > plugin "float", you can then use the code: > > > > > [(float side=right myimage.png)] > > > > > On Aug 30, 7:11 pm, DrunkenMonk <[email protected]> wrote: > > > > > > Second question first: > > > > > > Boltwire doesn't have a built in way to do this, as it is something > > > > > that is done with html - as such, use a stylesheet (.css) and specify > > > > > the following: > > > > > > ------------------------------------------- > > > > > > div.tright { > > > > > clear: right; > > > > > float: right; > > > > > border-width: .5em 0 .8em 1.4em;} > > > > > > div.tleft { > > > > > float: left; > > > > > clear: left; > > > > > margin-right: .5em; > > > > > border-width: .5em 1.4em .8em 0; > > > > > > } > > > > > > ------------------- > > > > > > (Taken from wikipedias default > > > > > stylesheet,http://en.wikipedia.org/skins-1.5/monobook/main.css) > > > > > > Then, you need to make sure that images you wish to float to the left > > > > > or right are placed in the correct type of div. This seems slightly > > > > > trickier, so lets look at some boltwire nuts and bolts: > > > > > > Boltwire places images directly on a page without an enclosing div. > > > > > This is a shame. We will have to make a plugin function that encloses > > > > > an image in a div: > > > > > > ---------------- > > > > > > $FLOATDIV = '<div class="t%s">%s</div>'; > > > > > function BOLTFfloat($args, $field) { > > > > > $side = 'right'; > > > > > $link = ''; > > > > > > if( isset($args['side']) ) $side = $args['side']; > > > > > if( !in_array($side, array('left', 'right')) ) return "error: > > > > > illegal side argument"; > > > > > > if( isset($args['link'] ) $link = $args['link']; > > > > > elseif( isset($args[1]) ) $link = $args[1]; > > > > > > return sprintf($FLOATDIV, $side, BOLTMuploads("img:$link")); > > > > > > } > > > > > > -------------- > > > > > > Put this function in a file in your plugins directory, then enable it. > > > > > Put the .css commands in your css file (your skin), and then use the > > > > > command: > > > > > > [(float side=right myimage.png)] > > > > > > wee! You're done. I would make this into a plugin but I haven't looked > > > > > at the boltwire skins yet, so I'm unsure how to include the .css > > > > > commands via the plugin. > > > > > > On Aug 30, 5:08 am, Kevin <[email protected]> wrote: > > > > > > > * Is there a way to specify in an External link that it needs to > > > > > > open > > > > > > in a new window? I saw where you could change the behavior of all > > > > > > links. I know the pros and cons for this but I need the user to > > > > > > stay > > > > > > on the support site while looking at remote links. > > > > > > > * Is there a way to display an image like a float (like float right > > > > > > or > > > > > > float left) where the text flows around the image rather than being > > > > > > above or below it. This is more cosmetic than anything else, > > > > > > > Something like: > > > > > > > XXXXXXXXXXX ! Header > > > > > > XX IMAGE XX > > > > > > XXXXXXXXXXX Text starts right of the (float left) image and > > > > > > continues under it... rather than... > > > > > > > ! Header > > > > > > XXXXXXXXXXX > > > > > > XX IMAGE XX > > > > > > XXXXXXXXXXX > > > > > > This as it apears to only do now... > > > > > > > Just started working with this wiki after looking at a number of > > > > > > them, > > > > > > MediaWiki, TWiki, TRAC, MoinMoin to name a few. This was by far one > > > > > > of the easyest to setup and it hasn't been too hard to figure out. > > > > > > I've not really used a Wiki before (been using forums for a long > > > > > > long > > > > > > time). > > > > > > > Many of the other ones had "issues" that many times I couldn't > > > > > > figure > > > > > > out if it was my configuration or just a bug. Found that in some it > > > > > > was a bug. Some of them in the very area that I had a requirement > > > > > > for. > > > > > > > While I know Perl pretty good, I found PHP based systems easier to > > > > > > use, modify and setup. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "BoltWire" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/boltwire?hl=en -~----------~----~----~----~------~----~------~--~---
