11
martyras
Suddenly users can't register: ERROR: Invalid email
  • 2005/2/1 2:25

  • martyras

  • Just popping in

  • Posts: 37

  • Since: 2004/11/1


Hi. My hosting company updated their site with php v.4.3.10 (Zend Optimizer v2.5.7). I don't know if they updated the MySQL too but the phpinfo() states Client API version: 3.23.58. My site works flawlessly until i discoved something that wasn't happening before.

Every user that tries to register, whatever email they put (talking about acceptable emails), they get the form with the error massage:
ERROR: Invalid email.
What will be the cause of this? What could the hosting company have changed to cause this?

Thank you.



12
martyras
Re: One user login with a username
  • 2005/1/8 21:21

  • martyras

  • Just popping in

  • Posts: 37

  • Since: 2004/11/1


First, Happy new year all XOOPS friends!

I have changed the code so the check doesn't apply to admins:

if ($user->isAdmin() == false) { 
        if (
$user->isOnline()) {
            
redirect_header('index.php'3"User is already logged in");
        }
    }


Anyone to help me on how to exclude moderators too?

And another question. It seems that the online block gets the database updates (deletes inactive users) after a large number of user logins. Is there a way to decrease that number?

Thanks.



13
martyras
Theme for a basketball site
  • 2004/12/17 1:55

  • martyras

  • Just popping in

  • Posts: 37

  • Since: 2004/11/1


Hello,

I am looking for a theme that goes with a site that focuses on basketball news. I would like it to have grey/blue & orange colours. Are there any suggestions?

Thank u.



14
martyras
Re: Breaking down "location" at register form.
  • 2004/12/16 20:57

  • martyras

  • Just popping in

  • Posts: 37

  • Since: 2004/11/1


was too easy!

Thanks, it worked like charm.



15
martyras
Re:How to put news on index page
  • 2004/12/16 19:28

  • martyras

  • Just popping in

  • Posts: 37

  • Since: 2004/11/1


Glad you're back with an update & a fix.

I have also added poster's name and profile link.

In news_top.php changed this:
$sql "SELECT storyid, title, [u]uid[/u], published, expired, counter, hometext, bodytext, nohtml, nosmiley, comments FROM ".$xoopsDB->prefix("stories")." WHERE published < ".time()." AND published > 0 AND (expired = 0 OR expired > ".time().") ORDER BY ".$options[0]." DESC";


In news_top.php added this:
$member_handler =& xoops_gethandler('member');
$member =& $member_handler->getUser($myrow['uid']);
$uname $member->getVar('name','E'); //replace 'name' with 'uname' if you want to display the username instead of realname.
                
$news['postedby'] = $uname;
$news['postedbyid'] = $myrow['uid'];


In news_block_top.html changed this:
[u]<span class="itemPostDate">Posted by <a href="<{$xoops_url}>/userinfo.php?uid=<{$news.postedbyid}>"><{$news.postedby}></aon <{$news.date}></span> (<span class="itemStats"><{$news.hits}> reads</span>)[/u]


Still searching for topicid. Hope we'll find a way.



16
martyras
Breaking down "location" at register form.
  • 2004/12/16 18:51

  • martyras

  • Just popping in

  • Posts: 37

  • Since: 2004/11/1


Hi,

Previously i had included successfully the 'location' field in user registration form. Cause a lot of users don't enter all of their address details I want to split down the 'location' field to let's say these fields:

In registerform.php
$reg_form->addElement(new XoopsFormText(_US_LOCATION_ADDRESS"user_from_address"3060$user_from_address), true);
$reg_form->addElement(new XoopsFormText(_US_LOCATION_TOWN"user_from_town"3060$user_from_town), true);
$reg_form->addElement(new XoopsFormText(_US_LOCATION_ZIP"user_from_zip"3030$user_from_zip), true);


In language/english/user.php I add all the information for _US_LOCATION_ADDRESS etc.

Now in register.php I have added
<input type='hidden' name='user_from_addreess' value='".$myts->makeTboxData4PreviewInForm($user_from_address)."' />
<
input type='hidden' name='user_from_town' value='".$myts->makeTboxData4PreviewInForm($user_from_town)."' />
<
input type='hidden' name='user_from_zip' value='".$myts->makeTboxData4PreviewInForm($user_from_zip)."' />


But in the database, I want all these fields to be entered as one in 'Location' field. Example:

Location: Address, Town, Zip

What & where should i modify in register.php for this to be done? I know it's easy but i can't make it work. I suspect that has something to do with that line:
$newuser->setVar('user_from'$user_from);


Thank you.



17
martyras
Re: Retrieve "real name" from a specific "uid".
  • 2004/12/7 21:56

  • martyras

  • Just popping in

  • Posts: 37

  • Since: 2004/11/1


I think this is for the user that is logged in. I want to read the real name from a specific user's "uid". Thanks for posting.



18
martyras
Retrieve "real name" from a specific "uid".
  • 2004/12/7 21:11

  • martyras

  • Just popping in

  • Posts: 37

  • Since: 2004/11/1


Hi, I am building a module and i would like to know how can I read the real name of a user from a specific "uid". If possible, i would like to read the config of news module to see if I have selected the username or real name for showing under title in the news. I tried using the function uname() from /modules/news/class.newsstory.php but with no luck! If someone can help me...



19
martyras
Re: News-block module
  • 2004/12/7 16:23

  • martyras

  • Just popping in

  • Posts: 37

  • Since: 2004/11/1


Hmm, maybe i was too drunk that night...

Anyway found it.

Just change this:
$sql "SELECT t.topic_title, s.storyid, s.topicid, s.title, s.comments, s.counter
                        FROM "
.$xoopsDB->prefix("stories")." s, ".$xoopsDB->prefix("topics")." t
                        WHERE s.topicid=t.topic_id  
                        ORDER BY s.storyid DESC LIMIT 
$limit";


Into this:
$sql "SELECT t.topic_title, s.storyid, s.topicid, s.title, s.comments, s.counter, s.published, s.expired
                        FROM "
.$xoopsDB->prefix("stories")." s, ".$xoopsDB->prefix("topics")." t
                        WHERE s.topicid=t.topic_id AND s.published < "
.time()." AND s.published > 0 AND (s.expired = 0 OR s.expired > ".time().")  
                        ORDER BY s.storyid DESC LIMIT 
$limit";


Happy xooping!



20
martyras
Re: One user login with a username
  • 2004/12/7 15:33

  • martyras

  • Just popping in

  • Posts: 37

  • Since: 2004/11/1


Ok, it works but with some minnor gliches.

1) If a user hasn't logged out (for example, closed the browser and go to the website again), XOOPS report him as logged and he can't login again. Is there a way to make XOOPS update the database that the user is logged out when he closes the browser (I assuse it has to do with inactivity time).

2) Is there a way for this modification not to apply for administrators or other specified groups?

Thank you.




TopTop
« 1 (2) 3 4 »



Login

Who's Online

209 user(s) are online (144 user(s) are browsing Support Forums)


Members: 0


Guests: 209


more...

Donat-O-Meter

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

Latest GitHub Commits