1
lelkins
Re: RegCodes/RegKeys type module for XOOPS 2.3.1?
  • 2008/12/3 16:58

  • lelkins

  • Just popping in

  • Posts: 19

  • Since: 2008/11/26


Hi ghia, Thanks for the reply.
Problem is, I am not receiving any errors as such.
It is just that it isn't integrated with XOOPS 2.3.x and the default profile module. Users are able to just register as normal without having to enter any registration code.
Is there any mod available to integrate with 2.3.x and the profile mod?

Thanks.



2
lelkins
Re: RegCodes/RegKeys type module for XOOPS 2.3.1?
  • 2008/12/3 10:51

  • lelkins

  • Just popping in

  • Posts: 19

  • Since: 2008/11/26


Nothing? Nada? Zilch? Surely there must be people using this on an XOOPS 2.3.x site, so how is it done?

Cheers



3
lelkins
RegCodes/RegKeys type module for XOOPS 2.3.1?
  • 2008/12/2 17:54

  • lelkins

  • Just popping in

  • Posts: 19

  • Since: 2008/11/26


Does anyone know of a module similar to RegCodes or RegKeys that can be used with XOOPS 2.3.1 using the profile module that comes with the installation?

I have searched the forum but can't seem to find any info so far. Also, been onto the freeformsolutions website to discuss using RegCodes with 2.3.1 and Profile mod, and the info there seems to point towards it being a no go.

I hope someone can point me to a compatible mod.

Cheers



4
lelkins
Re: Profile field display somewhere else
  • 2008/12/2 14:52

  • lelkins

  • Just popping in

  • Posts: 19

  • Since: 2008/11/26


OK, so I just finished up trying to improve this bit of my site, and I can't figure it out.
I want to have this code in an external file rather than coded straight into the block to make it easier to manage, but can't figure out how to do it.
So I have just a few questions which I hope someone could answer for me please.
1. Can I use the php include function in a block, if so, how do I code it?
2. To put this script into an external file, do I need to ammend it at all?
3. What file format would the external file be, I assumed php but I don't want to assume anything at the moment.

I hope someone can help me with this.

Thanks



5
lelkins
Re: Profile field display somewhere else
  • 2008/12/1 17:35

  • lelkins

  • Just popping in

  • Posts: 19

  • Since: 2008/11/26


Quote:

by dhsoft on 2008/12/1 17:28:44

in a Block


global $xoopsUser;
$myField = '';
if (is_object( $xoopsUser )) {
$myField = $xoopsUser->getVar('user_from');
}
echo $myField;


WOOHOO!!! Now, one last question for you dhsoft...where do you live so I can give you a big fat sloppy man love kiss?

Cheers.



6
lelkins
Re: Profile field display somewhere else
  • 2008/12/1 16:55

  • lelkins

  • Just popping in

  • Posts: 19

  • Since: 2008/11/26


Thanks for the reply, but when I put it in a PHP Script custom block it shows the following error.

Parse error: syntax error, unexpected '<' in *********\xoopsblock.php(147) : eval()'d code on line 1

When I put it in an HTML custom block, it just shows the script.

What am I doing wrong?



7
lelkins
Re: Profile field display somewhere else
  • 2008/12/1 16:34

  • lelkins

  • Just popping in

  • Posts: 19

  • Since: 2008/11/26


Is there not anyone that can help me? I have the code below which works if I add it to the header, but how can I put it into a block from the block admin page?

<{if $xoops_isuser}>
<b>Email:&nbsp;</b><{php}>global $xoopsUser; if(($xoopsUser->testField() == "12345"))
{
echo "TEST";
}
<{/php}>
<{/if}>

Anyone? Please, this is driving me crazy!!!! ARGHH!!!



8
lelkins
Re: Profile field display somewhere else
  • 2008/12/1 12:24

  • lelkins

  • Just popping in

  • Posts: 19

  • Since: 2008/11/26


More info. I have extended the code to include the if var = blah blah blah which is working, but only if I put it in HTML page. The code is

<{if $xoops_isuser}>
<b>Email:&nbsp;</b><{php}>global $xoopsUser; if(($xoopsUser->testField() == "12345"))
{
echo "TEST";
}
<{/php}>
<{/if}>

Problem is, I can not get this to work in a block and have tried searching for examples but I am pretty stumped with this 1. Anyone can let me know how to adapt this to add it in a block? Cheers



9
lelkins
Re: Profile field display somewhere else
  • 2008/12/1 12:00

  • lelkins

  • Just popping in

  • Posts: 19

  • Since: 2008/11/26


OK, so I have found something else that I can get to work in an HTML page. Code is

<{if $xoops_isuser}>
<{php}>global $xoopsUser; echo($xoopsUser->testField());<{/php}>
<{/if}>

So, first question, how do I put that into a block?
And second, how can I adapt it to say something along the lines of, if $xoopsUser->testfield = "TEST" then echo "BLAH BLAH"
else echo "12345"

I would be very grateful for some help with this. Thanks.



10
lelkins
Re: Profile field display somewhere else
  • 2008/12/1 11:28

  • lelkins

  • Just popping in

  • Posts: 19

  • Since: 2008/11/26


After a bit more reading I am totally lost, so just trying every snippet that I can find. So I added the following code to class/xoopsblock.php hoping it might help..
function getUserFrom($myField){                 if (is_object($xoopsUser) && $xoopsUser->getVar('uid') > 0){                     $myField $xoopsUser->getVar('user_from');                                   }                 return $myField;             }


Funny to say, I am still stuck... is what I have done right? If it is, how do I then call $myField in a custom block?

Please guys, I really need some help with this because I need to replicate this principle throughout my site numerous times, so if I can just get it right once, I will follow suit for the rest.

Cheers




TopTop
(1) 2 »



Login

Who's Online

137 user(s) are online (65 user(s) are browsing Support Forums)


Members: 0


Guests: 137


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