111
xgarb
Re: How do i change the maximum signature length??
  • 2003/12/5 13:07

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


My experience of changing ~text to varchar is the way the text is formatted to the userinfo page. ~text will fill the area whereas varchar retains the formatting of the input box.

Changing from tinytext to medium text gives the user a lot more space to add stuff which might not be a good idea. Shame there isn't an inbetweenie.

Try it and see.

And check out the MySQL site and look at column types.



112
xgarb
Re: 3rd party chat advice needed
  • 2003/12/1 9:36

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


Soory, should've been clearer... the chat works but I cannot get the 'who's chatting' block to work, or show up or anything! Spent a looonnggg time trying things and I wondered if it was incompatible with the latest core or something?



113
xgarb
Re: 3rd party chat advice needed
  • 2003/11/30 18:52

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


Can't seem to get this working on 2.0.5.

Would there be any reason for this?


with PHP debug on I get this..

Warning [PHP]: fopen(/~~~pathto~~~/cache/db%3Ainchat.html) [function.fopen]: failed to open stream: No such file or directory in file class/smarty/Smarty.class.php line 1998

(~~~pathto~~~ being the webserver path )



114
xgarb
Re: xoops.org problems?
  • 2003/11/17 16:02

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


any idea what all this is... get it at the top of the page in the forums...

%3A11156%3Bi% <snip> %3Bi%3A1068229521%3Bi%3A13566%3Bi%3A1068229636%3Bi%3A13560%3Bi%3A1068229683%3Bi%3A13562%3Bi%3A1068229784%3Bi%3A13563%3Bi%3A1068229986%3Bi%3A13859%3Bi%3A1069084819%3B%7D; expires=Tue, 16-Nov-04 16:00:19 GMT; path=/modules/newbb/ Content-Type: text/html; charset=ISO-8859-1 Age: 368 Connection: close Via: HTTP/1.1 ntl_site (Traffic-Server/5.2.4-58955 [c sSf ])



115
xgarb
xoops.org problems?
  • 2003/11/17 15:46

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


Is it me or is there a problem with xoops.org? I've been getting sloooow pages, junk at the top of a page, html rather than the page.

Anyone else?



116
xgarb
Re: 2 Common Registration/Password Problems
  • 2003/11/14 11:29

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


assuming XOOPS 2.05..

tutorial on this page...

http://www.softsound.org/help/aollinks/

so I added to register.tpl (additions in bold) ....
Quote:

To become a member of {SITENAME}, please confirm your
request by clicking on the link below:

{X_UACTLINK}

AOL USERS...
<A HREF=" {X_UACTLINK} ">CLICK HERE</A>

If you have trouble with the link please copy and paste it into your browser.



Don't have AOL to test it however.



117
xgarb
Re: XOOPS 2.1 Core development Roadmap
  • 2003/10/31 14:27

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


Hello,

What's the dynamic user profile?

For me I'd like more stuff for the users to have to play with. Buddylists, bookmarking (for news, forum postings within XOOPS), group mail, sentmail/deleted mail.

All the usual portal stuff I suppose.

Andrew



118
xgarb
Re: Bit of a toughie - database column into select field - how?
  • 2003/10/31 13:40

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


OK I've worked out a way to do this now. Thanks for everyones help.

1) I drop the following code into xoopslists (creates an array same as other lists)...

function &member_location ()
{
global $xoopsDB;
$locations = array();
$sql = "SELECT DISTINCT location FROM xoops_users ORDER BY location";
$result = mysql_query($sql);

while($location = $xoopsDB->fetchArray($result)){

$locations[$location['location']] = $location['location'];
}

return $locations;
}

2) Make a copy of formselectcountry and change the contents to

class XoopsFormSelectLocation extends XoopsFormSelect
{

function XoopsFormSelectLocation($caption, $name, $value=null, $size=1)
{
$this->XoopsFormSelect($caption, $name, $value, $size);
$this->addOptionArray(XoopsLists::member_location());
}
}

3) Save this as formselectlocation.php and add this to xoopsformloader.php

4) You can then use it in members/index.php the same as the other select form fields ie...

$location_text = new XoopsFormSelectLocation(_MM_COUNTRY, 'location', 'location');



Sweet!

Andrew



119
xgarb
Re: Criteria class for SQL 'OR' - solved
  • 2003/10/28 16:37

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


OK. I've done it now.

MySQL's order of operations is AND before OR which is why the code selects all the people from Andorra. ( http://mysql.progen.com.tr/doc/en/Selecting_rows.html)

I had to create 2 new criteria classes with a slightly different render function to create a bracket either side of the 'OR' statement.

My code now looks like this...

if ( !empty($HTTP_POST_VARS['interest']) ) {

$choseninterest=$myts->addSlashes(trim($HTTP_POST_VARS['interest']));

$criteria = new CriteriaCompoBegin(new Criteria('interest1', $choseninterest));
$criteria->add(new Criteria('interest2', $choseninterest), 'OR');
$criteria->add(new Criteria('interest3', $choseninterest), 'OR');
$criteria->add(new CriteriaEnd('interest4', $choseninterest), 'OR');

}

And the sql it generates (including the location part)...

SELECT * FROM xoops_users WHERE ((interest1 = 'Camping' OR interest2 = 'Camping' OR interest3 = 'Camping' OR interest4 = 'Camping') AND location = 'Andorra' AND level > 0) ORDER BY uname ASC LIMIT 0, 20

Hurrah!




120
xgarb
Re: Criteria class for SQL 'OR'
  • 2003/10/28 11:38

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


It gets weirder!...

I've tidied the code a little. Don't need the mySQL wildcards so...

if ( !empty($HTTP_POST_VARS['interest']) ) {
$criteria = new CriteriaCompo(new Criteria('interest1',$myts->addSlashes(trim($HTTP_POST_VARS['interest']))));
$criteria->add(new Criteria('interest2', $myts->addSlashes(trim($HTTP_POST_VARS['interest']))), 'OR');
$criteria->add(new Criteria('interest3', $myts->addSlashes(trim($HTTP_POST_VARS['interest']))), 'OR');
$criteria->add(new Criteria('interest4', $myts->addSlashes(trim($HTTP_POST_VARS['interest']))), 'OR');
}

add to this another form field choice for location - another select pull down

if ( !empty($HTTP_POST_VARS['location']) ) {
$criteria->add(new Criteria('location', $myts->addSlashes(trim($HTTP_POST_VARS['location']))));
}

and in the sql debug window you get the expected SQL...

SELECT * FROM xoops_users WHERE (interest1 = 'Camping' OR interest2 = 'Camping' OR interest3 = 'Camping' OR interest4 = 'Camping' AND location = 'Andorra' AND level > 0) ORDER BY uname ASC LIMIT 0, 20

but XOOPS ( here, I imagine, $foundusers =& $member_handler->getUsers($criteria, true); ) returns all users who like camping not just the one in Andorra.

Huh?!

Help!

Andrew




TopTop
« 1 ... 9 10 11 (12) 13 14 »



Login

Username:
Password:

Lost Password? Register now!

Who's Online

62 user(s) are online (43 user(s) are browsing Support Forums)


Members: 0


Guests: 62


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits