I am having the same problem as Benoit.When I follow the instructions given it either doen&#39;t yield the desired results or it breaks my web site.<br><br>I think sometime in the future PM needs a technical writer to go over all of the instructions in the cookbook and make sure that no instructions are left out or assumed by the programmer writing the particular script.
<br><br>You would not believe the trouble I had with ZAP.<br>Just a suggestion.--jack marting<br><br><div><span class="gmail_quote">On 9/11/07, <b class="gmail_sendername"><a href="mailto:pmwiki-users-request@pmichaud.com">
pmwiki-users-request@pmichaud.com</a></b> &lt;<a href="mailto:pmwiki-users-request@pmichaud.com">pmwiki-users-request@pmichaud.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Send pmwiki-users mailing list submissions to<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="mailto:pmwiki-users@pmichaud.com">pmwiki-users@pmichaud.com</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users">
http://www.pmichaud.com/mailman/listinfo/pmwiki-users</a><br>or, via email, send a message with subject or body &#39;help&#39; to<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="mailto:pmwiki-users-request@pmichaud.com">pmwiki-users-request@pmichaud.com
</a><br><br>You can reach the person managing the list at<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="mailto:pmwiki-users-owner@pmichaud.com">pmwiki-users-owner@pmichaud.com</a><br><br>When replying, please edit your Subject line so it is more specific
<br>than &quot;Re: Contents of pmwiki-users digest...&quot;<br><br><br>Today&#39;s Topics:<br><br>&nbsp;&nbsp; 1. Getting CleanURLs work as on <a href="http://pmwiki.org">pmwiki.org</a> with method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #3?<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Benoit Dutilleul)
<br>&nbsp;&nbsp; 2. Re: Getting CleanURLs work as on <a href="http://pmwiki.org">pmwiki.org</a> with&nbsp;&nbsp;method #3?<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Ben Wilson)<br>&nbsp;&nbsp; 3. Re: Need to Enter Password Repeatedly? (Patrick R. Michaud)<br>&nbsp;&nbsp; 4. Re: ldap (Maria McKinley)
<br>&nbsp;&nbsp; 5. AuthUser and an external DB (Jeff Brown)<br>&nbsp;&nbsp; 6. Reading text from a wiki page (Josh Miller)<br>&nbsp;&nbsp; 7. Re: Reading text from a wiki page (Josh Miller)<br>&nbsp;&nbsp; 8. Re: Hiding the edit button (:if auth admin:) (Sandy)
<br>&nbsp;&nbsp; 9. Re: Attach (Mark Trumpold)<br>&nbsp;&nbsp;10. conditional markup for AuthUser groups (Christophe David)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Mon, 10 Sep 2007 20:18:32 +0200
<br>From: &quot;Benoit Dutilleul&quot; &lt;<a href="mailto:benoit.dutilleul@googlemail.com">benoit.dutilleul@googlemail.com</a>&gt;<br>Subject: [pmwiki-users] Getting CleanURLs work as on <a href="http://pmwiki.org">pmwiki.org
</a> with<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;method&nbsp;&nbsp;#3?<br>To: <a href="mailto:pmwiki-users@pmichaud.com">pmwiki-users@pmichaud.com</a><br>Message-ID:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<a href="mailto:a05691ec0709101118j178fa0c0k4fc5e24a21d88050@mail.gmail.com">a05691ec0709101118j178fa0c0k4fc5e24a21d88050@mail.gmail.com
</a>&gt;<br>Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br><br>Hello!<br><br>If that is possible, can somebody explain me how to do it step by step?<br>I have managed to get the links on the page generated properly (
e.g.<br><a href="http://www.mysite.org/Main/Page">http://www.mysite.org/Main/Page</a> by setting $ScriptUrl=&#39;<a href="http://www.mysite.org">http://www.mysite.org</a>&#39;;<br>and $EnablePathInfo = 0;) but the links would not work (
i.e. non-pmwiki 404<br>error when I click on a link).<br><br>If you have a solution, thanks in advance!<br><br>Benoit<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: /pipermail/pmwiki-users/attachments/20070910/9c02ab8c/attachment-
0001.html<br><br>------------------------------<br><br>Message: 2<br>Date: Mon, 10 Sep 2007 14:55:11 -0400<br>From: &quot;Ben Wilson&quot; &lt;<a href="mailto:dausha@gmail.com">dausha@gmail.com</a>&gt;<br>Subject: Re: [pmwiki-users] Getting CleanURLs work as on 
<a href="http://pmwiki.org">pmwiki.org</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;with&nbsp;&nbsp;&nbsp;&nbsp;method #3?<br>To: &quot;Benoit Dutilleul&quot; &lt;<a href="mailto:benoit.dutilleul@googlemail.com">benoit.dutilleul@googlemail.com</a>&gt;<br>Cc: <a href="mailto:pmwiki-users@pmichaud.com">
pmwiki-users@pmichaud.com</a><br>Message-ID:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<a href="mailto:cc6097050709101155o4f88ccf4lf7feea6c0c8ab80f@mail.gmail.com">cc6097050709101155o4f88ccf4lf7feea6c0c8ab80f@mail.gmail.com</a>&gt;<br>Content-Type: text/plain; charset=ISO-8859-1
<br><br>You also need to set .htaccess<br><br><a href="http://www.pmwiki.org/wiki/Cookbook/CleanUrls">http://www.pmwiki.org/wiki/Cookbook/CleanUrls</a><br><br>On 9/10/07, Benoit Dutilleul &lt;<a href="mailto:benoit.dutilleul@googlemail.com">
benoit.dutilleul@googlemail.com</a>&gt; wrote:<br>&gt; Hello!<br>&gt;<br>&gt; If that is possible, can somebody explain me how to do it step by step?<br>&gt; I have managed to get the links on the page generated properly (
e.g.<br>&gt; <a href="http://www.mysite.org/Main/Page">http://www.mysite.org/Main/Page</a> by setting<br>&gt; $ScriptUrl=&#39;<a href="http://www.mysite.org">http://www.mysite.org</a>&#39;; and $EnablePathInfo = 0;) but the links
<br>&gt; would not work (i.e. non-pmwiki 404 error when I click on a link).<br>&gt;<br>&gt; If you have a solution, thanks in advance!<br>&gt;<br>&gt; Benoit<br>&gt;<br>&gt; _______________________________________________
<br>&gt; pmwiki-users mailing list<br>&gt; <a href="mailto:pmwiki-users@pmichaud.com">pmwiki-users@pmichaud.com</a><br>&gt; <a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users">http://www.pmichaud.com/mailman/listinfo/pmwiki-users
</a><br>&gt;<br>&gt;<br><br><br>--<br>Ben Wilson<br>&quot;Words are the only thing which will last forever&quot; Churchill<br><br><br><br>------------------------------<br><br>Message: 3<br>Date: Mon, 10 Sep 2007 14:45:45 -0500
<br>From: &quot;Patrick R. Michaud&quot; &lt;<a href="mailto:pmichaud@pobox.com">pmichaud@pobox.com</a>&gt;<br>Subject: Re: [pmwiki-users] Need to Enter Password Repeatedly?<br>To: Jesse Heines &lt;<a href="mailto:heines@cs.uml.edu">
heines@cs.uml.edu</a>&gt;<br>Cc: &quot;&#39;Fred G. Martin&#39;&quot; &lt;<a href="mailto:fredm@cs.uml.edu">fredm@cs.uml.edu</a>&gt;, <a href="mailto:pmwiki-users@pmichaud.com">pmwiki-users@pmichaud.com</a><br>Message-ID: &lt;
<a href="mailto:20070910194545.GD20002@host.pmichaud.com">20070910194545.GD20002@host.pmichaud.com</a>&gt;<br>Content-Type: text/plain; charset=us-ascii<br><br>On Thu, Sep 06, 2007 at 09:50:41PM -0400, Jesse Heines wrote:
<br>&gt; The problem turned out to be that my site:<br>&gt;<br>&gt;&nbsp;&nbsp; <a href="http://www.performamatics.org">http://www.performamatics.org</a><br>&gt;<br>&gt; which is really:<br>&gt;<br>&gt;&nbsp;&nbsp; <a href="http://teaching.cs.uml.edu/Performamatics/">
http://teaching.cs.uml.edu/Performamatics/</a><br>&gt;<br>&gt; was registered on GoDaddy.com with Domain Forwarding **AND MASKING<br>&gt; ENABLED**.&nbsp;&nbsp;The masking prevents the domain name displayed in the address<br>&gt; bar from being changed.
<br>&gt;<br>&gt; I don&#39;t know why masking affects the storing of session data, but it most<br>&gt; certainly does, at least on my system.&nbsp;&nbsp;When I turned masking off,<br>&gt; everything worked fine and I only needed to enter the password once per
<br>&gt; session.&nbsp;&nbsp;Of course, with masking turned off, going to<br>&gt; <a href="http://www.performamatics.org">http://www.performamatics.org</a> shows a visible redirect to<br>&gt; <a href="http://teaching.cs.uml.edu/Performamatics/">
http://teaching.cs.uml.edu/Performamatics/</a>.<br><br>I suspect the problem is that the session cookies being generated<br>by PHP are being associated with the &quot;<a href="http://teaching.cs.uml.edu">teaching.cs.uml.edu
</a>&quot; site,<br>so that the browser doesn&#39;t send the cookie when accessing the<br>&quot;<a href="http://www.performamatics.org">www.performamatics.org</a>&quot; version of the site.<br><br>When a new PHP session is created, the browser is given a cookie
<br>that it sends with each subsequent request to the same server.<br>But browsers think of &quot;same server&quot; as being &quot;same domain name&quot; --<br>i.e., a browser won&#39;t send a cookie from &quot;<a href="http://teaching.cs.uml.edu">
teaching.cs.uml.edu</a>&quot;<br>to a server at &quot;<a href="http://www.performamatics.org">www.performamatics.org</a>&quot; because the browser<br>treats them as being separate servers (as it is supposed to).<br><br>Pm
<br><br><br><br>------------------------------<br><br>Message: 4<br>Date: Mon, 10 Sep 2007 13:22:19 -0700<br>From: &quot;Maria McKinley&quot; &lt;<a href="mailto:parody@u.washington.edu">parody@u.washington.edu</a>&gt;<br>
Subject: Re: [pmwiki-users] ldap<br>To: <a href="mailto:pmwiki-users@pmichaud.com">pmwiki-users@pmichaud.com</a><br>Message-ID:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<a href="mailto:fddba4730709101322x3c573c68k8a9440a6fb6d9658@mail.gmail.com">fddba4730709101322x3c573c68k8a9440a6fb6d9658@mail.gmail.com
</a>&gt;<br>Content-Type: text/plain; charset=ISO-8859-1<br><br>Thanks to Graham and Thomas, I now have it figured out. I was missing<br>the part where I said what to do with the login once it happened. So,<br>for future reference to get ldap to work you need:
<br><br>## assign an ldap server, with basedn<br>$AuthUser[&#39;ldap&#39;] = &quot;ldap://ldap.example.org/ou=people,dc=example,dc=org?uid&quot;;<br><br>## Want to use AuthUser so we can use ldap for passwords<br>## Needs to go BELOW the ldapserver assignment
<br>include_once(&quot;$FarmD/scripts/authuser.php&quot;);<br><br>##Security Variables set login for edit &amp; history page<br>## to let anyone edit that has an ldap entry:<br>$HandleAuth[&#39;diff&#39;] = &#39;edit&#39;;
<br>$DefaultPasswords[&#39;edit&#39;] = &#39;id:*&#39;;<br>$Author = $AuthId;<br><br>or to check the groups in ldap, and let different groups do different<br>things, do something like this:<br><br>$AuthUser[&#39;@editors&#39;] =&nbsp;&nbsp;get_ldap_values(&quot;cn=groups&quot;, &quot;(cn=GROUP)&quot;,
<br>array(&quot;memberUid&quot;));<br>$AuthUser[&#39;@admins&#39;] =&nbsp;&nbsp;get_ldap_values(&quot;cn=groups&quot;,<br>&quot;(cn=OTHERGROUP)&quot;, array(&quot;memberUid&quot;));<br><br>$DefaultPasswords[&#39;edit&#39;] = &#39;@editors&#39;;
<br>$DefaultPasswords[&#39;attr&#39;] = &#39;@editors&#39;;<br>$DefaultPasswords[&#39;upload&#39;] = &#39;@editors&#39;;<br>$DefaultPasswords[&#39;admin&#39;] = array(&#39;@admins&#39;,&#39;id:ANOTHERUSER&#39;);<br><br>cheers,
<br>maria<br><br>On 9/10/07, Thomas Gemperli &lt;<a href="mailto:gemperli@arch.ethz.ch">gemperli@arch.ethz.ch</a>&gt; wrote:<br>&gt; Hi<br>&gt;<br>&gt; On 10.09.2007, at 10:53, Maria McKinley wrote:<br>&gt;<br>&gt; &gt; On 9/10/07, Thomas Gemperli &lt;
<a href="mailto:gemperli@arch.ethz.ch">gemperli@arch.ethz.ch</a>&gt; wrote:<br>&gt; &gt;&gt; Hi<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; On 10.09.2007, at 09:46, Maria McKinley wrote:<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;&gt; I am trying to get authentication using ldap working, and having a
<br>&gt; &gt;&gt;&gt; very hard time. here are the lines I added to local/config.php:<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; ## Want entire site to be password-protected for editing.<br>&gt; &gt;&gt;&gt; $DefaultPasswords[&#39;edit&#39;] = crypt(&#39;edit_password&#39;);
<br>&gt; &gt;&gt;&gt; ## Want to use AuthUser so we can use ldap for passwords<br>&gt; &gt;&gt;&gt; include_once(&quot;$FarmD/scripts/authuser.php&quot;);<br>&gt; &gt;&gt;&gt; # use <a href="http://ldap.shadlen.org">ldap.shadlen.org
</a> for authentication<br>&gt; &gt;&gt;&gt; $AuthUser[&#39;ldap&#39;] = &#39;ldap://ldap.shadlen.org/ou=people,dc=shadlen?<br>&gt; &gt;&gt;&gt; dc=org?&#39;;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; I&#39;m using ldap, with the following config:
<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; $AuthUser[&#39;ldap&#39;] = &quot;ldap://host.domain.tld/<br>&gt; &gt;&gt; cn=users,dc=domain,dc=tld?<br>&gt; &gt;&gt; uid&quot;;<br>&gt; &gt;&gt; #&nbsp;&nbsp;Enable authuser extensions - MUST be BELOW every $AuthUser entry
<br>&gt; &gt;&gt; in this file<br>&gt; &gt;&gt; include_once(&quot;$FarmD/scripts/authuser.php&quot;);<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Make sure to include authuser.php below any $AuthUser lines.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Thomas
<br>&gt; &gt;&gt;<br>&gt; &gt;<br>&gt; &gt; Thanks a bunch. That does seem like something worth putting in the<br>&gt; &gt; docs under AuthUser, ldap. Maybe I&#39;ll do that once I have this all<br>&gt; &gt; figured out, since it is a wiki and all. :-)&nbsp;&nbsp;However, it doesn&#39;t seem
<br>&gt; &gt; to completely solve my problem. Now I get no error message, it just<br>&gt; &gt; doesn&#39;t log me in,<br>&gt;<br>&gt; No message, like &quot;invalid username&quot; or something similar?<br>&gt;<br>&gt; &gt; so I don&#39;t know if the ldap enquiry was successful
<br>&gt; &gt; and there is some other problem, or if I am still having ldap<br>&gt; &gt; problems.<br>&gt;<br>&gt; Well, if PmWiki does not complain about your username/password login<br>&gt; was successful.<br>&gt; Now you probably need to define which users are allowed to edit/
<br>&gt; upload/etc pages.<br>&gt;<br>&gt; I use something like this in my config.php:<br>&gt;<br>&gt; $AuthUser[&#39;@editors&#39;] =&nbsp;&nbsp;get_ldap_values(&quot;cn=groups&quot;, &quot;(cn=GROUP)&quot;,<br>&gt; array(&quot;memberUid&quot;));
<br>&gt; $AuthUser[&#39;@admins&#39;] =&nbsp;&nbsp;get_ldap_values(&quot;cn=groups&quot;,<br>&gt; &quot;(cn=OTHERGROUP)&quot;, array(&quot;memberUid&quot;));<br>&gt;<br>&gt; $DefaultPasswords[&#39;edit&#39;] = &#39;@editors&#39;;<br>
&gt; $DefaultPasswords[&#39;attr&#39;] = &#39;@editors&#39;;<br>&gt; $DefaultPasswords[&#39;upload&#39;] = &#39;@editors&#39;;<br>&gt; $DefaultPasswords[&#39;admin&#39;] = array(&#39;@admins&#39;,&#39;id:ANOTHERUSER&#39;);
<br>&gt;<br>&gt; Please note, I use a self written piece of php to get group members<br>&gt; out of my LDAP directory (Apple OpenDirectory). It will most likely<br>&gt; not work with AD. Anyway, you can &quot;hardcode&quot; legitimated users in
<br>&gt; config.php, for example:<br>&gt;<br>&gt; $AuthUser[&#39;@editors&#39;] =&nbsp;&nbsp;&#39;id:USER1, id:USER2&#39;;<br>&gt; $DefaultPasswords[&#39;edit&#39;] = &#39;@editors&#39;;<br>&gt;<br>&gt; JFYI, I have attached my &quot;get the group members cookbook&quot;. Probably
<br>&gt; you would like to &quot;port&quot; it to AD. ;)<br>&gt;<br>&gt; Thomas<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; pmwiki-users mailing list<br>
&gt; <a href="mailto:pmwiki-users@pmichaud.com">pmwiki-users@pmichaud.com</a><br>&gt; <a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users">http://www.pmichaud.com/mailman/listinfo/pmwiki-users</a><br>&gt;<br>&gt;
<br>&gt;<br><br><br>--<br>Maria Mckinley<br>Scientific Programmer<br>Shadlen Lab<br>Physiology and Biophysics<br>Box 357290<br>University of Washington<br>(206) 616-3923<br><a href="mailto:parody@u.washington.edu">parody@u.washington.edu
</a><br><br><br><br>------------------------------<br><br>Message: 5<br>Date: Mon, 10 Sep 2007 18:38:14 -0400<br>From: Jeff Brown &lt;<a href="mailto:sparks@ts4b.com">sparks@ts4b.com</a>&gt;<br>Subject: [pmwiki-users] AuthUser and an external DB
<br>To: <a href="mailto:pmwiki-users@pmichaud.com">pmwiki-users@pmichaud.com</a><br>Message-ID: &lt;<a href="mailto:6.1.0.6.2.20070910182717.04103e50@mail.ts4b.com">6.1.0.6.2.20070910182717.04103e50@mail.ts4b.com</a>&gt;<br>
Content-Type: text/plain; charset=us-ascii; format=flowed;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x-avg-checked=avg-ok-48927B3C<br><br>Hi<br><br>I am new to PmWiki. Trying to get AuthUser to authenticate against a forum<br>database. I want only my forum members to edit wiki pages. For a couple
<br>reasons, I am not using AuthUserDB, I am calling the PHP ODBC module directly.<br><br>I&#39;ve written a script (based on AuthUserBBPress) which queries my database<br>and returns true/false on user, pswd challenge.&nbsp;&nbsp;This code is at the end of
<br>this email. I&#39;ve tested this script on it&#39;s own and it works.<br><br>Along with defining the SnitzAuthDB in my config, I have:<br><br>$DefaultPasswords[&#39;edit&#39;] = &#39;id:*&#39;;<br>include_once &quot;cookbook/snitzauth.php&quot;;
<br>include_once &#39;scripts/authuser.php&#39;;<br><br>Do I need something on my Site.AuthUser page to tell AuthUser how to call<br>my script, snitzauth.php?<br><br>When trying to edit any page, I get a user/pass challenge, but only
<br>&quot;Name/password not recognized&quot;.<br><br>Can anyone point me in the right direction?<br><br>Many Thanks - Jeff<br><br><br><br>&lt;?php if (! defined (&#39;PmWiki&#39;)) exit;<br><br>/*<br>&nbsp;&nbsp;* Authenticate Against a Snitz Forums user database using ODBC to a DSN
<br>&nbsp;&nbsp;*<br>&nbsp;&nbsp;* To use, import and set the SnitzAuthDb array as follows:<br>&nbsp;&nbsp;* $SnitzAuthDb = array(<br>&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&#39;dsn&#39; =&gt; &#39;connection name&#39;,<br>&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&#39;user&#39; =&gt; &#39;dbuser&#39;,<br>&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&#39;password&#39; =&gt; &#39;dbpass&#39;,
<br>&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&#39;table&#39; =&gt; &#39;FORUM_MEMBERS&#39;,<br>&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&#39;userfield&#39; =&gt; &#39;M_NAME&#39;,<br>&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&#39;pwfield&#39; =&gt; &#39;M_PASSWORD&#39;<br>&nbsp;&nbsp;* );<br>&nbsp;&nbsp;*/<br><br>$AuthUserFunctions[&#39;snitz&#39;] = &#39;AuthUserSnitz&#39;;
<br><br>function AuthUserSnitz($pagename, $id, $pw, $pwlist) {<br>&nbsp;&nbsp; global $SnitzAuthDb;<br><br>&nbsp;&nbsp; $link =<br>odbc_connect($SnitzAuthDb[&#39;dsn&#39;],$SnitzAuthDb[&#39;user&#39;],$SnitzAuthDb[&#39;password&#39;]);<br>&nbsp;&nbsp; if (!$link)&nbsp;&nbsp;die(&#39;Could not connect: &#39;.odbc_error());
<br><br>&nbsp;&nbsp; $user = $SnitzAuthDb[&#39;userfield&#39;];<br>&nbsp;&nbsp; $pass = $SnitzAuthDb[&#39;pwfield&#39;];<br>&nbsp;&nbsp; $table = $SnitzAuthDb[&#39;table&#39;];<br><br>&nbsp;&nbsp; $id = user_sanitize($id);<br>&nbsp;&nbsp; $pw = user_sanitize(hash(&#39;sha256&#39;, $pw));
<br>&nbsp;&nbsp; $ask = &quot;SELECT * from $table WHERE $user=&#39;$id&#39; AND $pass=&#39;$pw&#39;;&quot;;<br><br>&nbsp;&nbsp; $result = odbc_exec($link, $ask);<br>&nbsp;&nbsp; if (!$result) die(&quot;Could not successfully run query ($query) from DB:
<br>&quot;.odbc_error());<br><br>&nbsp;&nbsp;return (abs(odbc_num_rows($result)) &gt; 0) ? true : false;<br>}<br><br>function user_sanitize( $text ) {<br>&nbsp;&nbsp;&nbsp;&nbsp; $text = preg_replace(&#39;/[^a-z0-9_-]/i&#39;, &#39;&#39;, $text);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return $text;
<br>}<br><br>?&gt;<br><br><br>--<br>No virus found in this outgoing message.<br>Checked by AVG Free Edition.<br>Version: 7.5.485 / Virus Database: 269.13.14/999 - Release Date: 9/10/2007 5:43 PM<br><br><br><br><br><br>------------------------------
<br><br>Message: 6<br>Date: Mon, 10 Sep 2007 20:07:44 -0400<br>From: &quot;Josh Miller&quot; &lt;<a href="mailto:josh@virtualmillers.net">josh@virtualmillers.net</a>&gt;<br>Subject: [pmwiki-users] Reading text from a wiki page
<br>To: &lt;<a href="mailto:pmwiki-users@pmichaud.com">pmwiki-users@pmichaud.com</a>&gt;<br>Message-ID:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<a href="mailto:1678927AA1223B4B8C0250C6F05928B62FC4@mail.virtualmillers.net">1678927AA1223B4B8C0250C6F05928B62FC4@mail.virtualmillers.net
</a>&gt;<br>Content-Type: text/plain;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; charset=&quot;us-ascii&quot;<br><br><br>Hello!<br><br>I used the code below to pull a listing of categories off of a page<br>named Site.Categories that I was using to put a list of available
<br>categories into a dropdown box.&nbsp;&nbsp;Somewhere in my upgrade from 2.1 to<br>2.2. this code stopped working.&nbsp;&nbsp;Anyone have any idea why this is not<br>working...?<br><br>I&#39;m stumped...<br><br>---------------------------------------------
<br>SDV($CatFile, &quot;Site.Categories&quot;);<br>SDV($CatLineDelimiter, &quot;**&quot;);<br>SDV($CatRemoveItemize, false);<br><br>function f_insertcategories($opts)<br>{<br>&nbsp;&nbsp;global $CatFile;<br>&nbsp;&nbsp;global $CatLineDelimiter;
<br>&nbsp;&nbsp;global $CatRemoveItemize;<br><br>&nbsp;&nbsp;$defaults = array(<br>&nbsp;&nbsp;&nbsp;&nbsp;&#39;page&#39;=&gt;&#39;&#39;<br>&nbsp;&nbsp;);<br>&nbsp;&nbsp;$args = array_merge($defaults, ParseArgs($opts));<br>&nbsp;&nbsp;$page = $args[&#39;page&#39;];<br>&nbsp;&nbsp;if ($page == &#39;&#39;) {
<br>&nbsp;&nbsp;&nbsp;&nbsp;$page = $CatFile;<br>&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;$contents = ReadPage($page);<br>&nbsp;&nbsp;$arrCats = $contents[text];<br>&nbsp;&nbsp;$arrCats = str_replace($CatLineDelimiter, &quot;&lt;br /&gt;&quot;, $arrCats);<br><br>&nbsp;&nbsp;if ($CatRemoveItemize) {
<br>&nbsp;&nbsp;&nbsp;&nbsp;$arrCats = explode(&quot;*&quot;, $arrCats);<br>&nbsp;&nbsp;&nbsp;&nbsp;$arrCats[0] = substr($arrCats[0], 1, strlen($arrCats[0])-1);<br>&nbsp;&nbsp;} else {<br>&nbsp;&nbsp;&nbsp;&nbsp;$arrCats = explode(&quot;\n&quot;, $arrCats);<br>&nbsp;&nbsp;}<br>&nbsp;&nbsp;if (isset($arrCats)) {
<br>&nbsp;&nbsp;&nbsp;&nbsp;$optionstring=&quot;&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;foreach($arrCats as $val){<br>&nbsp;&nbsp;&nbsp;&nbsp;$optionstring=$optionstring.&quot;&lt;option value=$val&gt;&amp;nbsp;&amp;nbsp;<br>$val&lt;/option&gt;&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;return $optionstring;
<br>&nbsp;&nbsp;} else {<br>&nbsp;&nbsp;&nbsp;&nbsp;return &quot;&quot;;<br>&nbsp;&nbsp;}<br>}<br>---------------------------------------------<br><br>Thanks for your time.<br>Josh Miller<br>Gouverneur<br><br><br><br><br>------------------------------<br><br>Message: 7
<br>Date: Mon, 10 Sep 2007 20:16:05 -0400<br>From: &quot;Josh Miller&quot; &lt;<a href="mailto:josh@virtualmillers.net">josh@virtualmillers.net</a>&gt;<br>Subject: Re: [pmwiki-users] Reading text from a wiki page<br>To: &lt;
<a href="mailto:pmwiki-users@pmichaud.com">pmwiki-users@pmichaud.com</a>&gt;<br>Message-ID:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<a href="mailto:1678927AA1223B4B8C0250C6F05928B62FC5@mail.virtualmillers.net">1678927AA1223B4B8C0250C6F05928B62FC5@mail.virtualmillers.net
</a>&gt;<br>Content-Type: text/plain;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; charset=&quot;us-ascii&quot;<br><br><br>Nevermind - I found the problem.<br>Thank you anyway.<br><br>-Josh<br><br><br><br><br>-----Original Message-----<br>From: <a href="mailto:pmwiki-users-bounces@pmichaud.com">
pmwiki-users-bounces@pmichaud.com</a><br>[mailto:<a href="mailto:pmwiki-users-bounces@pmichaud.com">pmwiki-users-bounces@pmichaud.com</a>] On Behalf Of Josh Miller<br>Sent: Monday, September 10, 2007 8:08 PM<br>To: <a href="mailto:pmwiki-users@pmichaud.com">
pmwiki-users@pmichaud.com</a><br>Subject: [pmwiki-users] Reading text from a wiki page<br><br><br>Hello!<br><br>I used the code below to pull a listing of categories off of a page<br>named Site.Categories that I was using to put a list of available
<br>categories into a dropdown box.&nbsp;&nbsp;Somewhere in my upgrade from 2.1 to<br>2.2. this code stopped working.&nbsp;&nbsp;Anyone have any idea why this is not<br>working...?<br><br>I&#39;m stumped...<br><br>---------------------------------------------
<br>SDV($CatFile, &quot;Site.Categories&quot;);<br>SDV($CatLineDelimiter, &quot;**&quot;);<br>SDV($CatRemoveItemize, false);<br><br>function f_insertcategories($opts)<br>{<br>&nbsp;&nbsp;global $CatFile;<br>&nbsp;&nbsp;global $CatLineDelimiter;
<br>&nbsp;&nbsp;global $CatRemoveItemize;<br><br>&nbsp;&nbsp;$defaults = array(<br>&nbsp;&nbsp;&nbsp;&nbsp;&#39;page&#39;=&gt;&#39;&#39;<br>&nbsp;&nbsp;);<br>&nbsp;&nbsp;$args = array_merge($defaults, ParseArgs($opts));<br>&nbsp;&nbsp;$page = $args[&#39;page&#39;];<br>&nbsp;&nbsp;if ($page == &#39;&#39;) {
<br>&nbsp;&nbsp;&nbsp;&nbsp;$page = $CatFile;<br>&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;$contents = ReadPage($page);<br>&nbsp;&nbsp;$arrCats = $contents[text];<br>&nbsp;&nbsp;$arrCats = str_replace($CatLineDelimiter, &quot;&lt;br /&gt;&quot;, $arrCats);<br><br>&nbsp;&nbsp;if ($CatRemoveItemize) {
<br>&nbsp;&nbsp;&nbsp;&nbsp;$arrCats = explode(&quot;*&quot;, $arrCats);<br>&nbsp;&nbsp;&nbsp;&nbsp;$arrCats[0] = substr($arrCats[0], 1, strlen($arrCats[0])-1);<br>&nbsp;&nbsp;} else {<br>&nbsp;&nbsp;&nbsp;&nbsp;$arrCats = explode(&quot;\n&quot;, $arrCats);<br>&nbsp;&nbsp;}<br>&nbsp;&nbsp;if (isset($arrCats)) {
<br>&nbsp;&nbsp;&nbsp;&nbsp;$optionstring=&quot;&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;foreach($arrCats as $val){<br>&nbsp;&nbsp;&nbsp;&nbsp;$optionstring=$optionstring.&quot;&lt;option value=$val&gt;&amp;nbsp;&amp;nbsp;<br>$val&lt;/option&gt;&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;return $optionstring;
<br>&nbsp;&nbsp;} else {<br>&nbsp;&nbsp;&nbsp;&nbsp;return &quot;&quot;;<br>&nbsp;&nbsp;}<br>}<br>---------------------------------------------<br><br>Thanks for your time.<br>Josh Miller<br>Gouverneur<br><br><br>_______________________________________________<br>
pmwiki-users mailing list<br><a href="mailto:pmwiki-users@pmichaud.com">pmwiki-users@pmichaud.com</a><br><a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users">http://www.pmichaud.com/mailman/listinfo/pmwiki-users
</a><br><br><br><br><br>------------------------------<br><br>Message: 8<br>Date: Mon, 10 Sep 2007 13:10:14 -0400<br>From: Sandy &lt;<a href="mailto:sandy@onebit.ca">sandy@onebit.ca</a>&gt;<br>Subject: Re: [pmwiki-users] Hiding the edit button (:if auth admin:)
<br>To: <a href="mailto:pmwiki-users@pmichaud.com">pmwiki-users@pmichaud.com</a><br>Message-ID: &lt;<a href="mailto:fc3tpt$c5s$1@sea.gmane.org">fc3tpt$c5s$1@sea.gmane.org</a>&gt;<br>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
<br><br>H. Fox wrote:<br>&gt; On 9/7/07, Sandy &lt;<a href="mailto:sandy@onebit.ca">sandy@onebit.ca</a>&gt; wrote:<br>&gt;&gt; Patrick R. Michaud wrote:<br>&gt;&gt;&gt; On Tue, Sep 04, 2007 at 08:45:59PM -0400, Sameer Kumar wrote:
<br>&gt;&gt;&gt;&gt; How about Opera?? Is there a key combination that would work in Opera?<br>&gt;&gt;&gt; According to the sites I searched (google for &quot;opera accesskey&quot;),<br>&gt;&gt;&gt; it looks like hitting Shift+ESC enables accesskeys.&nbsp;&nbsp;So, hitting
<br><br>&lt;snip&gt;<br>&gt;&gt; I never did get this to work reliably. I&#39;m using FireFox, and FireFox<br>&gt;&gt; keeps grabbing the codes itself.<br>&gt;<br>&gt; I don&#39;t think Firefox 2.x uses any key combination that could be an access key.
<br>&gt;<br>&gt; Note that, e.g. where the accesskey is e, in Firefox 1.x the key<br>&gt; combination was Alt-e and in Firefox 2.x it&#39;s Shift-Alt-e .<br>&gt;<br>&gt; Hagan<br><br>Yep, that works on PmWiki, now to stick it into a skin again.
<br><br>Thanks!<br><br>Still, shouldn&#39;t count on the client, traveling or subject to the whims<br>of his IT department, supplemented by Murphy, knowing which arcane<br>keystroke combination he needs for the particular version of the browser
<br>he&#39;s using today. All he wants to do is fix a typo; looking it up in<br>Google, assuming he knows what to look for, can turn a five-minute job<br>into a real hassle.<br><br>Sandy<br><br><br><br><br>------------------------------
<br><br>Message: 9<br>Date: Tue, 11 Sep 2007 09:05:43 +0300<br>From: Mark Trumpold &lt;<a href="mailto:mtrumpold@cacegypt.org">mtrumpold@cacegypt.org</a>&gt;<br>Subject: Re: [pmwiki-users] Attach<br>To: &quot;H. Fox&quot; &lt;
<a href="mailto:haganfox@users.sourceforge.net">haganfox@users.sourceforge.net</a>&gt;<br>Cc: PmWiki Users &lt;<a href="mailto:pmwiki-users@pmichaud.com">pmwiki-users@pmichaud.com</a>&gt;<br>Message-ID: &lt;<a href="mailto:C30C0AE7.FF24%mtrumpold@cacegypt.org">
C30C0AE7.FF24%mtrumpold@cacegypt.org</a>&gt;<br>Content-Type: text/plain;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; charset=&quot;US-ASCII&quot;<br><br>Hi again<br><br>I tried that and it will show then when I return the next day its gone<br>again?<br><br>Any clues?
<br><br>Seems strange. I may just reo the config file<br><br>M<br><br><br>On 5/9/07 5:32 PM, &quot;H. Fox&quot; &lt;<a href="mailto:haganfox@users.sourceforge.net">haganfox@users.sourceforge.net</a>&gt; wrote:<br><br>&gt; On 9/5/07, Mark Trumpold &lt;
<a href="mailto:mtrumpold@cacegypt.org">mtrumpold@cacegypt.org</a>&gt; wrote:<br>&gt;&gt; Hi all<br>&gt;&gt;<br>&gt;&gt; I know this is simple but I have completely forgotten how to get the<br>&gt;&gt; &#39;attach&#39; to show up for U\Ls
<br>&gt;<br>&gt; From docs/sample-config.php :<br>&gt;<br>&gt; ##&nbsp;&nbsp;If you want uploads enabled on your system, set $EnableUpload=1.<br>&gt; ##&nbsp;&nbsp;You&#39;ll also need to set a default upload password, or else set<br>&gt; ##&nbsp;&nbsp;passwords on individual groups and pages.&nbsp;&nbsp;For more information
<br>&gt; ##&nbsp;&nbsp;see PmWiki.UploadsAdmin.<br>&gt; # $EnableUpload = 1;<br>&gt; # $DefaultPasswords[&#39;upload&#39;] = crypt(&#39;secret&#39;);<br>&gt;<br>&gt; To that I would ad that you can set the upload size limit, e.g.<br>
&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;$UploadMaxSize = 1048576;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # One MB max size<br>&gt;<br>&gt; so if you only want Attach: links to work, you can set $UploadMaxSize to 0.<br>&gt;<br>&gt; Hagan<br><br>-----------------------------------
<br>May the best rugby team win and the captain&#39;s name be Stirling Mortlock!<br><br><br><br><br><br>------------------------------<br><br>Message: 10<br>Date: Tue, 11 Sep 2007 09:14:39 +0200<br>From: &quot;Christophe David&quot; &lt;
<a href="mailto:pmwiki@christophedavid.org">pmwiki@christophedavid.org</a>&gt;<br>Subject: [pmwiki-users] conditional markup for AuthUser groups<br>To: &quot;PmWiki Users&quot; &lt;<a href="mailto:pmwiki-users@pmichaud.com">
pmwiki-users@pmichaud.com</a>&gt;<br>Message-ID:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<a href="mailto:447cbad00709110014r3334ffabx8c9e15016b326183@mail.gmail.com">447cbad00709110014r3334ffabx8c9e15016b326183@mail.gmail.com</a>&gt;<br>Content-Type: text/plain; charset=ISO-8859-1
<br><br>When you have in SiteAdmin.AuthUser<br><br>user1: hash1<br>user2: hash2<br>user3: hash3<br>user4: hash4<br><br>@group1: user2, user3<br>@group2: user1, user4<br>@group3: user1, user2, user3<br><br>is there a way to create a conditional markup like (:if auth read:) to
<br>check if the user is member of a group:<br><br>Something like :<br><br>(:if MemberOfAuthUserGroup @group2:)<br>...<br>(:ifend:)<br><br><br>Thank you in anticipation.<br><br>Christophe<br><br><br><br>------------------------------
<br><br>_______________________________________________<br>pmwiki-users mailing list<br><a href="mailto:pmwiki-users@pmichaud.com">pmwiki-users@pmichaud.com</a><br><a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users">
http://www.pmichaud.com/mailman/listinfo/pmwiki-users</a><br><br><br>End of pmwiki-users Digest, Vol 27, Issue 26<br>********************************************<br></blockquote></div><br>