[pmwiki-users] CommentBox problem

2007-11-06 Thread Chris Carter
Hi everyone,

I just realized CommentBoxPlus is not working on my site.  I could have
sworn it was working before.  Maybe I changed something important and
didn't realize it.  When I type something and submit, nothing shows up.
Any suggestions? 

 

A sample can be found at: 

http://www.vagaboo.com/index.php?n=Main.Chile

 

Main.Chile contains:

 

(:include Main.Country:)

 

(:include Main.BulletinBoard:)

 

[[#comments]]

 

 

(:tableend:)

 

 

Main.BulletinBoard contains: 

 

(:table border=1 align=right width=40%:)

(:cell:)

!'''Discussion Board'''

%center%Post time sensitive notices, discuss study abroad in {*$Name}
and more!

(:cellnr:)(:commentbox:)

(:cellnr:)

 

 

 

Thanks. 

Chris 

 

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] basepage and PTVs not working.

2007-11-06 Thread Stirling Westrup
Patrick R. Michaud wrote:

> You may need to set $EnableRelativePageVars=1; .  This is not yet the
> default, although it's likely to become the default before 2.2.0
> is released.

D'Oh! I should have thought of that! I've gotten so used to having them turned
on, I forgot they weren't the default.

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Preventing a URL being converted to an IMG tag

2007-11-06 Thread DaveG
> There has been some talk about getting url(...) to automatically
> escape its contents after variable substitution has taken place.
> This can probably be done with a markup rule like:
> 
>   Markup('url()', ' "/url\\([^$UrlExcludeChars]+\\)/e",
> "Keep(PSS('$0'))");
This works great, thank you.

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Preventing a URL being converted to an IMG tag

2007-11-06 Thread Patrick R. Michaud
On Tue, Nov 06, 2007 at 07:23:48PM -0500, DaveG wrote:
> I'm trying to create a div with an image background inside a wiki page:
> 
> (:div id="test" 
> style="background-image:url({$SkinDirUrl}/images/spring/header_bg.jpg);":)
> (:divend:)
> 
> The problem is that $SkinDirUrl is being interpreted by PmWiki as an 
> image, and is converted to:
> 
> 
> 
> I've tried using [={$SkinDirUrl}=], but that obviously prevents PmWiki 
> interpreting the variable.
> 
> Is there anyway to achieve this?

At present the only way to do this is to use a url without
the http://server/ prefix.

(:div id="test" style="background-image:url(/path/to/pmwiki/pub/images/...)":)

There has been some talk about getting url(...) to automatically
escape its contents after variable substitution has taken place.
This can probably be done with a markup rule like:

  Markup('url()', 'http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] Preventing a URL being converted to an IMG tag

2007-11-06 Thread DaveG
I'm trying to create a div with an image background inside a wiki page:

(:div id="test" 
style="background-image:url({$SkinDirUrl}/images/spring/header_bg.jpg);":)
(:divend:)

The problem is that $SkinDirUrl is being interpreted by PmWiki as an 
image, and is converted to:



I've tried using [={$SkinDirUrl}=], but that obviously prevents PmWiki 
interpreting the variable.

Is there anyway to achieve this?


  ~ ~ David

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] basepage and PTVs not working.

2007-11-06 Thread Patrick R. Michaud
On Tue, Nov 06, 2007 at 06:41:14PM -0500, Stirling Westrup wrote:
> I have a problem with using PTVs relative to a basepage, on a site I'm working
> on. I can't point to the site under development, but I managed to reproduce it
> on a different site hosted by the same farm. All attempts to duplicate the
> problem on PmWiki have failed, and I can't figure out what's different.

>  ini_set('display_errors', 1);
>   $EnableDiag=1;
>   $EnablePathInfo = 1;
>   $PubDirUrl = "http://sti.pooq.com/patterns/pub";;
>   $FarmPubDirUrl = "http://sti.pooq.com/wikipub";;
>   $ScriptUrl = "http://sti.pooq.com/patterns";;
>   $DefaultPasswords['admin'] = crypt('quick');
> 
> Does anyone have any ideas what could be going wrong? My farmconfig.php file
> is completely empty, so its nothing that I'm doing there.

You may need to set $EnableRelativePageVars=1; .  This is not yet the
default, although it's likely to become the default before 2.2.0
is released.

Pm

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] basepage and PTVs not working.

2007-11-06 Thread Stirling Westrup
I have a problem with using PTVs relative to a basepage, on a site I'm working
on. I can't point to the site under development, but I managed to reproduce it
on a different site hosted by the same farm. All attempts to duplicate the
problem on PmWiki have failed, and I can't figure out what's different.

Here's the PmWiki test page that works fine:

  http://www.pmwiki.org/wiki/Test/BaseA

It correctly includes Test.BaseB using a basepage of Test.BaseC.

When I try the exact same thing on a clean install in my farm, it doesn't work:

  http://sti.pooq.com/patterns/Test/BaseA

The local/config for this latter site is very simple:

  http://sti.pooq.com/patterns/pub";;
  $FarmPubDirUrl = "http://sti.pooq.com/wikipub";;
  $ScriptUrl = "http://sti.pooq.com/patterns";;
  $DefaultPasswords['admin'] = crypt('quick');

Does anyone have any ideas what could be going wrong? My farmconfig.php file
is completely empty, so its nothing that I'm doing there.




___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] updating (MYSQL) tables

2007-11-06 Thread Ben Stallings
Sjaak van Werkhoven wrote,
> I have got a problem with selecting data from an SQL table. This table is
> filled with new data using one form
> 
> (:update form table=protocol
> fields=voorwaarde,conclusie,documentatie,akkoord,conc_sterkte,user
> submit=post:)
> (:input hidden user value={$Author}:)
> ||class=firstrow border=0 cellspacing=22 width=40%
> ||! Voorwaarde ||! Conclusie ||
> ||(:update textarea voorwaarde rows=3 cols=50:)|| (:update textarea
> conclusie rows=3 cols=50:)||
> ||class=firstrow border=0 cellspacing=22 width=25%
> ||!Documentatie:||(:update file documentatie rows=1 cols=30:)||
> ||!Conclusie sterkte:||(:update select conc_sterkte from=concl_sterkte:)||
> ||!Akkoord:   ||(:update radio akkoord Ja:)Ja (:update radio akkoord Nee
> checked=1:)Nee||
> ||(:update submit value="Submit Changes":)||[[
> http://192.168.42.109/pmwiki/pmwiki.php?n=Main.HomePage?action=logout|Uitloggen]
> ]
> (:update end:)
> 
> and should be updated using another form:
> 
> (:update form table=protocol
> fields=voorwaarde,conclusie,documentatie,conc_sterkte,akkoord, user
> required=voorwaarde where=voorwaarde method=get:)
> ||border=1
> ||!Voorwaarde ||!Conclusie ||!Documentatie ||!Sterkte ||!Akkoord ||!User ||
> ||(:update text voorwaarde value={$voorwaarde}:)||(:update text conclusie
> value={$conclusie}:)||(:update text documentatie
> value={$documentatie}:)||(:update text conc_sterkte
> value={$conc_sterkte}:)||(:update text akkoord value={$akkoord}:)||(:update
> text user value={$user}:)||
> (:update submit value="Submit Changes":)
> (:update end:)
> 
> As you can see I had trouble with filling the last form with the data from
> the SQL table. Can someone tell me how to get this data available within the
> last form? Is there a possibility to get more examples using MYSQL tables
> within wiki pages? I

Hi, Sjaak.  It's been a while since I worked with UpdateForm -- I mainly 
use DataQuery now -- but I'll do my best to answer your question.

As far as I can recall or judge from the documentation, UpdateForm does 
not use page variables like {$var} to display data; it only uses 
(:update:) tags.  So your second form should use the (:update:) tags as 
they appear in your first form above, without specifying the values, 
because (:update:) tags automatically display the values from the 
database record.  By specifying values that are not defined I believe 
you are confusing the issue.

The first form, if it is to insert data only and not update, could use 
(:input:) tags instead of (:update:) (with the exception of (:update 
form:)).  This will ensure that you can use the same form repeatedly and 
get a new record each time.  Your second form (once it is fixed) will 
also be perfectly capable of adding new records if you just don't 
specify a record ID (in this case voorwaarde), but once it has been 
submitted the new record will be displayed, which may not be the 
behavior you want.

Note also that your first form above says submit=post instead of 
method=post, and the second says method=get.  UpdateForm only accepts 
data submitted by method=post.

I hope this helps.  If not, send me the URL of your site and I'll take a 
look.  --Ben S.

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Dumb Question: Access Classes without AuthUser?

2007-11-06 Thread Stirling Westrup
Patrick R. Michaud wrote:
> On Tue, Nov 06, 2007 at 02:39:38AM -0500, Stirling Westrup wrote:
>> I've got a PmWiki website that I also use as a personal information manager.
>> Right now I'm not using AuthUser, since there's only two classes of access:
>> public and private.
>>
>> Now, I've been thinking of putting up some content that I want to limit to a
>> few close friends. Rather than going the full AuthUser route, I'd like to 
>> just
>> introduce some passwords that would give varying degrees of access to the
>> internals. As such, I would have group passwords, but no usernames. Such a
>> scheme might look like:
>>
>> $DefaultPasswords['@personal']  = crypt("JustMePassword");
>> $DefaultPasswords['@intimates'] = crypt("VeryCloseFriendsPassword");
>> $DefaultPasswords['@friends']   = crypt("FriendsPassword");
>> $DefaultPasswords['@prerelease']= crypt("AlmostPublicPassword");
> 
> Yes, except that $DefaultPasswords is normally tied to actions and
> not to accounts...
> 
> I think you can get what you want by doing something like:
> 
>   if (@$_POST['authpw']) {
> $AuthGroupPasswords = array(
>   '@personal' => crypt("JustMePassword"),
>   '@intimates' => crypt("VeryCloseFriendsPassword"),
>   '@friends' => crypt("FriendsPassword"),
>   '@prerelease' => crypt("AlmostPublicPassword"));
> #  loop through all of the group/password combinations, setting
> #  $authlist[group] to 1 for any matches
> foreach($AuthGroupPasswords as $g => $pw) {
>   if (crypt($_POST['authpw'], $pw) == $pw) 
> $authlist[$g] = 1;
> }
> #  if we had any matches, then authorize the group for this session.
> if ($authlist) SessionAuth($pagename, array('authlist'=>$authlist));
>   }
> 
> I haven't tested the above, but it should be fairly close.
> 
> Hope this helps,
> 
Thanks! I'll be trying this out shortly.


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Dumb Question: Access Classes without AuthUser?

2007-11-06 Thread Patrick R. Michaud
On Tue, Nov 06, 2007 at 07:57:27AM -0600, Tegan Dowling wrote:
> On Nov 6, 2007 7:35 AM, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> >
> > Yes, except that $DefaultPasswords is normally tied to actions and
> > not to accounts...
> >
> > I think you can get what you want by doing something like:
> >
> > [...]
> >
> > I haven't tested the above, but it should be fairly close.
> >
> 
> When this is confirmed to work, could someone please add it to the
> cookbook?  I almost always use the default, password-based
> authentication, rather than any of the user-based authentication
> schemes, and this would be very, very useful for some of my sites that
> have several categories of user, but that have fairly high turnover in
> who those users are -- like a school, for instance.

Indeed.  I'll either make it a recipe or add it to the core somehow.

> If I understand this correctly, I could set the edit password for a
> given group as @student, and then in my config I could re-define the
> @student password each year.  Is that right?

That's correct.

Pm

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Dumb Question: Access Classes without AuthUser?

2007-11-06 Thread Tegan Dowling
On Nov 6, 2007 7:35 AM, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> On Tue, Nov 06, 2007 at 02:39:38AM -0500, Stirling Westrup wrote:
> > I've got a PmWiki website that I also use as a personal information manager.
> > Right now I'm not using AuthUser, since there's only two classes of access:
> > public and private.
> >
> > Now, I've been thinking of putting up some content that I want to limit to a
> > few close friends. Rather than going the full AuthUser route, I'd like to 
> > just
> > introduce some passwords that would give varying degrees of access to the
> > internals. As such, I would have group passwords, but no usernames. Such a
> > scheme might look like:
> >
> > $DefaultPasswords['@personal']  = crypt("JustMePassword");
> > $DefaultPasswords['@intimates'] = crypt("VeryCloseFriendsPassword");
> > $DefaultPasswords['@friends']   = crypt("FriendsPassword");
> > $DefaultPasswords['@prerelease']= crypt("AlmostPublicPassword");
>
> Yes, except that $DefaultPasswords is normally tied to actions and
> not to accounts...
>
> I think you can get what you want by doing something like:
>
>   if (@$_POST['authpw']) {
> $AuthGroupPasswords = array(
>   '@personal' => crypt("JustMePassword"),
>   '@intimates' => crypt("VeryCloseFriendsPassword"),
>   '@friends' => crypt("FriendsPassword"),
>   '@prerelease' => crypt("AlmostPublicPassword"));
> #  loop through all of the group/password combinations, setting
> #  $authlist[group] to 1 for any matches
> foreach($AuthGroupPasswords as $g => $pw) {
>   if (crypt($_POST['authpw'], $pw) == $pw)
> $authlist[$g] = 1;
> }
> #  if we had any matches, then authorize the group for this session.
> if ($authlist) SessionAuth($pagename, array('authlist'=>$authlist));
>   }
>
> I haven't tested the above, but it should be fairly close.
>

When this is confirmed to work, could someone please add it to the
cookbook?  I almost always use the default, password-based
authentication, rather than any of the user-based authentication
schemes, and this would be very, very useful for some of my sites that
have several categories of user, but that have fairly high turnover in
who those users are -- like a school, for instance.

If I understand this correctly, I could set the edit password for a
given group as @student, and then in my config I could re-define the
@student password each year.  Is that right?

Thanks!

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Dumb Question: Access Classes without AuthUser?

2007-11-06 Thread Patrick R. Michaud
On Tue, Nov 06, 2007 at 02:39:38AM -0500, Stirling Westrup wrote:
> I've got a PmWiki website that I also use as a personal information manager.
> Right now I'm not using AuthUser, since there's only two classes of access:
> public and private.
> 
> Now, I've been thinking of putting up some content that I want to limit to a
> few close friends. Rather than going the full AuthUser route, I'd like to just
> introduce some passwords that would give varying degrees of access to the
> internals. As such, I would have group passwords, but no usernames. Such a
> scheme might look like:
> 
> $DefaultPasswords['@personal']  = crypt("JustMePassword");
> $DefaultPasswords['@intimates'] = crypt("VeryCloseFriendsPassword");
> $DefaultPasswords['@friends']   = crypt("FriendsPassword");
> $DefaultPasswords['@prerelease']= crypt("AlmostPublicPassword");

Yes, except that $DefaultPasswords is normally tied to actions and
not to accounts...

I think you can get what you want by doing something like:

  if (@$_POST['authpw']) {
$AuthGroupPasswords = array(
  '@personal' => crypt("JustMePassword"),
  '@intimates' => crypt("VeryCloseFriendsPassword"),
  '@friends' => crypt("FriendsPassword"),
  '@prerelease' => crypt("AlmostPublicPassword"));
#  loop through all of the group/password combinations, setting
#  $authlist[group] to 1 for any matches
foreach($AuthGroupPasswords as $g => $pw) {
  if (crypt($_POST['authpw'], $pw) == $pw) 
$authlist[$g] = 1;
}
#  if we had any matches, then authorize the group for this session.
if ($authlist) SessionAuth($pagename, array('authlist'=>$authlist));
  }

I haven't tested the above, but it should be fairly close.

Hope this helps,

Pm

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] updating (MYSQL) tables

2007-11-06 Thread Sjaak van Werkhoven
Hi,

I have got a problem with selecting data from an SQL table. This table is
filled with new data using one form

(:update form table=protocol
fields=voorwaarde,conclusie,documentatie,akkoord,conc_sterkte,user
submit=post:)
(:input hidden user value={$Author}:)
||class=firstrow border=0 cellspacing=22 width=40%
||! Voorwaarde ||! Conclusie ||
||(:update textarea voorwaarde rows=3 cols=50:)|| (:update textarea
conclusie rows=3 cols=50:)||
||class=firstrow border=0 cellspacing=22 width=25%
||!Documentatie:||(:update file documentatie rows=1 cols=30:)||
||!Conclusie sterkte:||(:update select conc_sterkte from=concl_sterkte:)||
||!Akkoord:   ||(:update radio akkoord Ja:)Ja (:update radio akkoord Nee
checked=1:)Nee||
||(:update submit value="Submit Changes":)||[[
http://192.168.42.109/pmwiki/pmwiki.php?n=Main.HomePage?action=logout|Uitloggen]
]
(:update end:)

and should be updated using another form:

(:update form table=protocol
fields=voorwaarde,conclusie,documentatie,conc_sterkte,akkoord, user
required=voorwaarde where=voorwaarde method=get:)
||border=1
||!Voorwaarde ||!Conclusie ||!Documentatie ||!Sterkte ||!Akkoord ||!User ||
||(:update text voorwaarde value={$voorwaarde}:)||(:update text conclusie
value={$conclusie}:)||(:update text documentatie
value={$documentatie}:)||(:update text conc_sterkte
value={$conc_sterkte}:)||(:update text akkoord value={$akkoord}:)||(:update
text user value={$user}:)||
(:update submit value="Submit Changes":)
(:update end:)

As you can see I had trouble with filling the last form with the data from
the SQL table. Can someone tell me how to get this data available within the
last form? Is there a possibility to get more examples using MYSQL tables
within wiki pages? I

greetings

Sjaak van Werkhoven

-- 
Sjaak van Werkhoven

Emotional Brain bv,
Louis Armstrongweg 78,
1311 RL Almere,
tel 036 546 83 46
fax 036 549 71 46
[EMAIL PROTECTED]
___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users