Re: [pmwiki-users] breakpagelist
Hi again, and here comes my version of the breakpagelist.php (search for '#martin' to see my changes) Cheers, Martin. breakpagelist.php Description: application/php ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
[pmwiki-users] breakpagelist
Hi Hans and others, I just installed the the breakpagelist recipe and it's great. Anyway, I tuned the script a little, and hope you like it. Just search for #martin in the source code to see my changes: Here is a small summary of what I did: * added $BPLTo, $BPLFrom page variables * added some css classes * changed div->span * (:breakpagelist:) does not output the string 'Pages' anymore. @hans Would you put my changes onto the official Cookbook page? Anyway, the script is not perfect yet. Here are two problems I couldn't fix: * $PBLPageCount ALWAYS returns 1 (instead of the real pagelist number * $BPLTo returns a multiple of $BPLEntiresPerPage (which works in general, but not on the last batch) Does anybody have a suggestions, how to fix that problem? Cheers, Martin. ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] TotalCounter feature requests and some little changes
Hi again, in line 389 of totalcounter_1_8b.php: in_array() should be replaced with array_key_exists(). Am I supposed to put the totalcounter_1_8b.php on the Cookbook/TotalCounter by myself (I am not the original author)? Cheers, Martin. Martin Spindler wrote: > Hi Blues and list, > > I just downloaded the totalcounter_1_8a.php and it's great. > > Anyway, I did some small changes: > > * added $TotalCounterGuests -> replace of 'Guest (not authenticated)' > * added $TotalCounter['GuestCount'] -> count non authenticated guests > (IPs are used) > * added $TotalCounterBlackList['IPs'] which REALLY blocks ALL counters > for that address > * added $TotalCounter['IPs'][$tc_ip] counter and according html output > (for action=totalcounter) > > @blues: could you add the php script to the recipe page (as version > totalcounter_1_8b.php)? My changes are marked with "#martin" > > I also do have some feature requests: > > (1) adding a $TotalCounterWhiteList > (2) daily, monthly statistic (with extra files, e.g. > totalcounter_2007_02.stat) > (3) Could you please replace all tabs with spaces in the > total_counter_1_8b.php? > > > > ___ > pmwiki-users mailing list > pmwiki-users@pmichaud.com > http://www.pmichaud.com/mailman/listinfo/pmwiki-users ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
[pmwiki-users] viewing uploaded images
From reading the editing instructions it seems that standard images e.g. *.jpg files should be viewable automatically after they have been upload. But I can't get to work for me. I put in the " Attach:filename.jpg" on the page and saved the page I clicked on the link and got to the upload page, uploaded the file When back to the page where I was expecting the image and only got a link that took me back to the upload page If I then edit the page and put in http://localhost/path to upload directory/filename.jpg I get the image on the page correctly But that seems like a round about path for a file uploaded locally -- gary garcia [EMAIL PROTECTED] ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] Alternate authorization levels for $EnableDiag
Guillermo Calderon - INCO wrote: > H. Fox wrote: >> I would like to enable the diagnostic actions, but only for >> edit-authorized visitors to the site. I tried >> >>## Enable remote diagnostics (?action=diag and ?action=phpinfo). >>$EnableDiag = 1; >>$HandleAuth['diag'] = 'edit'; >>$HandleAuth['phpinfo'] = 'edit'; >> >> in a configuration file, but the diagnostic actions are still >> available to a plain old read-authorized visitor. How can I achieve >> the desired effect? >> > > I think the problem is in the file scripts/diag.php > > This file contains the following piece of code: > >if ($action=='diag') { > @session_start(); > header('Content-type: text/plain'); > print_r($GLOBALS); > exit(); >} > > There are no test for permissions there. > > You have to modify this file in order to fix this problem. > Not true! You almost never have to modify PmWiki's code to achieve this sort of thing. In this case, you want something more along the lines of: if( $PCache[$pagename]["=auth"]["edit"] ) { $EnableDiag = 1; } Which just tests to see if you have edit rights for the current page before turning on EnableDiag. (Note: I think this is right, but I haven't tested it.) ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
[pmwiki-users] New Page Form
Hello, I've modified the newpageform recipe so that it just shows a dropdown menu and a field for the name of the new page. and also show a template for each group when it brings the edit page. But I guess the modifications I've made disables the search function. Here are the changes I made to the NewPageFunction: function NewPageForm($pagename) { global $NewGroup; // $PageUrl = PageVar($pagename, '$PageUrl'); $out[] = " Group: "; foreach($NewGroup as $k=>$v) { $x = is_string($k) ? $k : $v; $out[] = "$v"; } $out [] = " Pagename: "; $out[] = ""; return FmtPageName(implode('',$out),$pagename); } And I added 3 lines to the end of the first else: $_REQUEST ['template'] = $_REQUEST ['group'].'.Template'; $urlfmt = '$PageUrl?action=edit&template='."{$_REQUEST ['template']}"; Redirect($pagename, $urlfmt); Bellow is the whole recipe in case it's needed. Thanks Naeimeh Group: "; foreach($NewGroup as $k=>$v) { $x = is_string($k) ? $k : $v; $out[] = "$v"; } $out [] = " Pagename: "; /* $out[] = " $[NewPage]: ";*/ $out[] = ""; return FmtPageName(implode('',$out),$pagename); } $HTMLStylesFmt[] = ".pitsfield { text-align:right; font-weight:bold; }\n"; include_once("$FarmD/scripts/author.php"); if ($action=='postnewpage') { //$_REQUEST ['template'] = $_REQUEST ['group'].'.Template'; $pagename = "{$_REQUEST ['group']}."."{$_REQUEST ['newpagename']}"; if (!PageExists($pagename)) { if ($_REQUEST ['group'] == "") { $pagename = "Main."."{$_REQUEST ['newpagename']}";} if ($_REQUEST ['group'] == "PITS") { Abort("cannot create pages in PITS. Please use the PITS Form for a new issue. It's located at $ScriptUrl/PITS/PITS ");} if ($_REQUEST ['newpagename'] == "") { $UrlPage="{$_REQUEST ['group']}"; Redirect($PageNotFound);} else Lock(2); //echo($urlfmt); $action = 'edit'; $_REQUEST['post'] = 1; $CreateTime = strftime('%Y-%m-%d %H:%M',$Now); $EditMessageFmt = "Please review and make any edits to your issue below, then press 'Save'"; $_POST['text'] = "{$_REQUEST['description']}"; $_REQUEST ['template'] = $_REQUEST ['group'].'.Template'; $urlfmt = '$PageUrl?action=edit&template='."{$_REQUEST ['template']}"; Redirect($pagename, $urlfmt); } else { // echo($urlfmt); Redirect($pagename); } } ?> ** To help combat SPAM DALSA will no longer return delivery failure notifications for incorrect or invalid addresses. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This email message has also been swept for the presence of computer viruses Please note that DALSA employee addresses have been standardized to dalsa.com-- Please update your address book as may be required ** ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] scrolling page
jdd wrote: > Hello, > Do you know any mean (other than flash) to have a scrolling wiki page? > > I would like to have scrolling photos in the right sidebar of the > triad skin... (from bottom to top or vice versa, like a film) > Write this line in the file pub/local.css: #rigthbar { height: 400px; /* or something approppriate % overflow: scroll; } If the file doesn exist, create it. ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
[pmwiki-users] Request: SlideShare Recipe
Greetings All, Has anyone considered creating a recipe for slideshare (www.slideshare.net)? I tried to alter the teachertube recipe but my attempt(s) failed due to a lack of PHP knowledge. I can embed the slideshare movies between (:html) slideshare (:htmlend:) but don't want to open this leverage up to my users. Thanks for considering, Robert___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] DataQuery and DataPlates: creating / updating record not working
> I'm experimenting with DataQuery and DataPlates. > > I have a simple MySQL table of 10 fields or so. I added a record to the > table via phpMyAdmin (pma). After installing DataPlates, I can list the > table and it shows the record. > > I attempted to add a new record. It says the form updated, but when I view > the table in pma there isn't a new record. I decided to next edit the > original record I added using pma. The change isn't saved. In both cases, no > error messages appear and the error log is empty. Hi, Scott. Thanks for trying DataQuery and DataPlates! Sorry to hear you're having trouble. My first guess (based only on what you've said) is that the name of the new page you're creating doesn't match the type of the query's key field. But that should result in the page being created in the wiki rather than the database. And it doesn't explain why you couldn't edit the record with phpMyAdmin -- that implies a problem outside of DataQuery. If you can send me the necessary usernames and passwords off-list, I'll be happy to take a look. --Ben ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] Applying a CSS defined Style to a Block
On Thu, Jun 28, 2007 at 11:40:35AM -0400, DaveG wrote: > > I've read through the numerous style related pages and didn't > come away with a clear answer. I have a style defined in my CSS > file that I'd like to apply to a block of text on a wiki page. > Is that possible? Try things like: %p box% my text to be styled %block box% my text to be styled >>box<< my text to be styled >><< Pm ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] Alternate authorization levels for $EnableDiag actions
H. Fox wrote: > I would like to enable the diagnostic actions, but only for > edit-authorized visitors to the site. I tried > >## Enable remote diagnostics (?action=diag and ?action=phpinfo). >$EnableDiag = 1; >$HandleAuth['diag'] = 'edit'; >$HandleAuth['phpinfo'] = 'edit'; > > in a configuration file, but the diagnostic actions are still > available to a plain old read-authorized visitor. How can I achieve > the desired effect? > I think the problem is in the file scripts/diag.php This file contains the following piece of code: if ($action=='diag') { @session_start(); header('Content-type: text/plain'); print_r($GLOBALS); exit(); } There are no test for permissions there. You have to modify this file in order to fix this problem. ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] Site.AuthList Questions
Tegan Dowling wrote: > If, however, you use ?action=login to take the user to the login screen, > and the user enters that password, the wiki will indeed authenticate the > user, but won't take the user back to the page they were on when they > clicked the link. Instead, the login screen remains -- confusing even > expert users into thinking that the password has failed. > > What about the way Pmwiki.org does Site/PageActions? Only the actions you are allowed to do show, so if you're not allowed to do anything, you see nothing. Maybe add "Current user can do the following on this page." It won't help if the user is on a page they have only read permission for, but it will help for the pages they can do more on. Sandy ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] Applying a CSS defined Style to a Block
Does- %box apply=block%my text to be styled achieve the desired effect? On 6/28/07, DaveG <[EMAIL PROTECTED]> wrote: I've read through the numerous style related pages and didn't come away with a clear answer. I have a style defined in my CSS file that I'd like to apply to a block of text on a wiki page. Is that possible? Among other things, I thought this might work: %box%[@ my text to be styled @] But it doesn't, and I don't really want to preformat the block. Given that I'd like the markup for this to be very simple, I suspect that defining some new markup tag is the way to achieve this? Is that correct, or is there something already in PmWiki that I can make use of? ~ ~ Dave ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
[pmwiki-users] Applying a CSS defined Style to a Block
I've read through the numerous style related pages and didn't come away with a clear answer. I have a style defined in my CSS file that I'd like to apply to a block of text on a wiki page. Is that possible? Among other things, I thought this might work: %box%[@ my text to be styled @] But it doesn't, and I don't really want to preformat the block. Given that I'd like the markup for this to be very simple, I suspect that defining some new markup tag is the way to achieve this? Is that correct, or is there something already in PmWiki that I can make use of? ~ ~ Dave ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
[pmwiki-users] Upload Directory Difficulties Not Related to Permission
Hi all, I am trying to enable uploading for the installation of PmWiki I have at my university site. I'm running into difficulty setting the upload directory info. in my config.php, I currently have set: $UploadUrlFmt = "http://www.university.edu/~userid/WikiUploads/";; $UploadDir = "WikiUploads"; When I go to attach a file, PmWiki creates a directory within it's installed directory named WikiUploads, and the file appears within it. PmWiki returns that the file upload is successful, however the image does not display. I suspect this may have something to do with the fact that the upload directory "usually must be in a location that is accessible to the web somewhere (e.g., in a subdirectory of *public_html*)." (according to http://www.pmichaud.com/wiki/PmWiki/UploadsAdmin ) . However, for the life of me, I can't figure out how to point it to create a directory in my public space (listed in the UploadUrlFmt). If I try $UploadDir ="userid\webspace\WikiUploads"; , I will find the file written in those directories written in PmWiki's directory. This action takes place regardless of if I include or comment out $UploadUrlFmt I'm not sure if my issue is an incorrect understanding of our server's directory structure, an incorrect usage of the php referring to it, or something else altogether. Thank You for your help! ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
[pmwiki-users] Draft page attributes question
When $EnableDrafts=1 , I do not want the public to be able to read draft pages. So I'd like to be able so set read permission attr for all draft pages to auth=admin so that only logged on admins can can read draft pages. Is there a variable I can set to automate draft page generation so that all drafts have read restricted to auth=admin? BTW, I'm also trying to avoid these draft pages from being slurped up by Google crawler. I'm hoping the above approach will help, but am open to ideas. Best, Brent -- Brent Zupp http://www.wanderings.net/ There is a very fine line between "hobby" and "mental illness." ~ Dave Barry ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] Feed 'fmt' parameter into action=rss?
Hey Jacky, That was a good idea. It didn't work for me in that the "fmt" I specified was not followed. But I really like idea behind your suggestion. I'll tinker with it to see if I can get it to work. Thanks for the suggestion! Brent On 6/26/07, Jacky <[EMAIL PROTECTED]> wrote: > It's said that action=rss uses pagelist to do the search. > I wonder if fmt would work on that? > > e.g. > ?action=rss&group=News&list=dates&order=-ctime&count=20&fmt=%23simpleblog > > -- > Best Regards, > Jacky > 網絡暴民 http://jacky.seezone.net > ___ > pmwiki-users mailing list > pmwiki-users@pmichaud.com > http://www.pmichaud.com/mailman/listinfo/pmwiki-users > > -- Brent Zupp http://www.wanderings.net/ There is a very fine line between "hobby" and "mental illness." ~ Dave Barry ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] Fox Security Settings
Thursday, June 28, 2007, 1:20:27 PM, [EMAIL PROTECTED] wrote: > Is that correct? > - $EnableAccessCode = false; -> Access-Code will not recognized, even if > implemented in the form. > - $EnableAccessCode = true; -> Access-Code will recognized, if implemented in > the form AND is > required in every other fox form. Yes. Maybe it is a bit illogical. You could add (:input hidden access {$AccessCode}:) to a form for providing the access code automatically, without a user entering it. > FoxBlog comes with a comment form (Access-Code) and a > NewBlogPage-Form (no Access-Code). To get > the comment form work with Access-Code, I have to set $Enable...=true AND put > the > Access-Code-Markup in every other form I like to use. Or do I get something > wrong? Yes. Perhaps the NewBlogPage should have an access code field as well. Or (:input hidden access {$AccessCode}:). Or use in config.php: $EnableAccessCode = true; if(CondAuth($pagename,'edit')) $EnableAccessCode = false; to disable the access code for when you are logged in as editor, provided you can use NewBlogPage also only if logged in. ~Hans ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] ImportText and $DiffKeepDays
On Thu, Jun 28, 2007 at 09:33:55AM +0200, Christophe David wrote: > When pages are imported using the ImportText recipe ( > http://www.pmwiki.org/wiki/Cookbook/ImportText ), PmWiki does not > appear to take in account the $DiffKeepDays variable ( > http://www.pmwiki.org/wiki/PmWiki/EditVariables#DiffKeepDays ): all > previous revisions are kept in the page, even if older that > $DiffKeepDays. > > This is annoying as the imported pages keep growing, eating up disk > space and possibly slowing down further processing. > > Would it be possible to let ImportText behave as a manual edit in this > context ? ImportText uses the exact same code for posting pages as a manual edit, so it should be honoring $DiffKeepDays already. Are you perhaps setting $DiffKeepDays in a per-group or per-page customization file? If so, then it may be that importing text is being triggered from pages that don't have lower settings for $DiffKeepDays. Pm ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] Fox Security Settings
Is that correct? - $EnableAccessCode = false; -> Access-Code will not recognized, even if implemented in the form. - $EnableAccessCode = true; -> Access-Code will recognized, if implemented in the form AND is required in every other fox form. FoxBlog comes with a comment form (Access-Code) and a NewBlogPage-Form (no Access-Code). To get the comment form work with Access-Code, I have to set $Enable...=true AND put the Access-Code-Markup in every other form I like to use. Or do I get something wrong? Greetings, Martin Viel oder wenig? Schnell oder langsam? Unbegrenzt surfen + telefonieren ohne Zeit- und Volumenbegrenzung? DAS TOP ANGEBOT JETZT bei Arcor: günstig und schnell mit DSL - das All-Inclusive-Paket für clevere Doppel-Sparer, nur 39,85 inkl. DSL- und ISDN-Grundgebühr! http://www.arcor.de/rd/emf-dsl-2 ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
[pmwiki-users] Variables expansion oddity in titles and pagelists
When using (:title $ton:) or (:title $kilo:) (in fact any title beginning with $t or $k, and probably other letters or sequences too) and then generating a pagelist using {=$Title}, the result is not what is expected. Apparently $t and $k are expanded first, then the rest of the string is appended. Apparently, starting a title with other characters like \ or { seem also to create problems in certain circumstances, but this is not certain yet. A possible solution might be to encode/escape special characters in the "title=" line of the files in wiki.d like title=$ton Any similar experiences ? Christophe ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] Fox Security Settings
Wednesday, June 27, 2007, 11:27:14 PM, [EMAIL PROTECTED] wrote: > That´s what I learned: Never ever put form pages in the Site-group unless > specifically > mentioned. This will not work even with the most permissive > setting, allowing any Fox actions on > any pages. Use a Test-Group or whatever. I think it is fine to have form pages in the Site group, like a FoxCommentForm page, and use it anywhere with a (:include Site.FoxCommentForm:). But the target pages should be outside Site and PmWiki groups, as both are explicitly excluded from being permitted for posting in fox.php. ~Hans ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Re: [pmwiki-users] Include Password in URL string to access protected pages
On Wed, 27 Jun 2007, Patrick R. Michaud wrote: If you're using curl as a command-line tool, try the -d option: curl -d authpw=banana http://my.wiki.org/ProtectedGroup.DataPage This generates a POST request for the page, exactly as if someone had filled in the authorization form. I added this to http://pmwiki.org/wiki/PmWiki/EditingAPI it's not an ideal location, but at least something. Is this the recommended way of doing it with 'curl'? /Christian This can also be done with the password as part of the url, but be aware that the password will appear (in cleartext) in the server logs as part of the request string. If you're okay with that, then you can do a local customization like: if (@$_GET['authpw']) SDV($_POST['authpw'], $_GET['authpw']); This allows passwords to come from url strings as well as forms. Then a url like the following should work: http://my.wiki.org/ProtectedGroup.DataPage?authpw=bananas No need to go through a separate "log in" step, just provide the password as part of the request. Pm -- Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users
[pmwiki-users] ImportText and $DiffKeepDays
When pages are imported using the ImportText recipe ( http://www.pmwiki.org/wiki/Cookbook/ImportText ), PmWiki does not appear to take in account the $DiffKeepDays variable ( http://www.pmwiki.org/wiki/PmWiki/EditVariables#DiffKeepDays ): all previous revisions are kept in the page, even if older that $DiffKeepDays. This is annoying as the imported pages keep growing, eating up disk space and possibly slowing down further processing. Would it be possible to let ImportText behave as a manual edit in this context ? Christophe ___ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users