Author Topic: yshout 5  (Read 6455 times)

ShadowMachine

  • Active Member
  • ***
  • Posts: 47
  • Karma: +2/-0
yshout 5
« on: November 28, 2008, 01:38:29 AM »
Does anyone have any experience with the yshout 5 ajax shoutbox? Specifically, this snippet:

Code: [Select]
// If you want to change the nickname, the line below is the one to modify.
// Simply set $overrideNickname to whatever variable you want to appear as the nickname,
// or leave it null to use the set nicknames.

$overrideNickname = null;

I've been trying to figure out what variable to use, have tried a few with no success. I thought maybe some of you had experimented with it.

Thanks

admin2

  • Guest
Re: yshout 5
« Reply #1 on: November 28, 2008, 04:27:57 AM »
I suppose you want that to be the name of the user logged into Etano.
Try including includes/common.inc.php from Etano's directory somewhere at the beginning of the file containing that snippet of code.
Then do
Code: [Select]
$overrideNickname = $_SESSION[_LICENSE_KEY_]['user']['user'];
Or you can do a session_start() instead of the include() (if there's none already) and then
Code: [Select]
$overrideNickname = $_SESSION[1234567]['user']['user'];where 1234567 is your Etano license key.

ShadowMachine

  • Active Member
  • ***
  • Posts: 47
  • Karma: +2/-0
Re: yshout 5
« Reply #2 on: January 03, 2009, 03:17:14 PM »
I did finally figure out a way to make this work. If anybody is interested in adding a shoutbox, yshout is pretty smooth, and I can show you what I did to integrate it.

jhcrash

  • Active Member
  • ***
  • Posts: 51
  • Karma: +2/-0
Re: yshout 5
« Reply #3 on: January 31, 2009, 06:12:53 PM »
Hi ShadowMachine
.. Yes please  ;)
Can you tell me what you did to intergrate it with etano dating software

Thanks in advance

Johnny

ShadowMachine

  • Active Member
  • ***
  • Posts: 47
  • Karma: +2/-0
Re: yshout 5
« Reply #4 on: February 02, 2009, 10:30:02 AM »
Install yshout 5 as per the instructions and make sure it's working.

In yshout/preferences.php, around line 6, comment out the line that begins with $overrideNickname =

Code: [Select]
// $overrideNickname =
In yshout/php/ajaxcall.class.php, look around line 220, and find this:

Code: [Select]
if ($nickname = cookieGet('yNickname'))
$this->updates['nickname'] = $nickname;

if ($overrideNickname)
$this->updates['nickname'] = $overrideNickname;

change to this:

Code: [Select]
if ($nickname = cookieGet('yNickname'))
$this->updates['nickname'] = $_SESSION['your_license_key']['user']['user'];

if ($overrideNickname)
$this->updates['nickname'] = $_SESSION['your_license_key']['user']['user'];

Naturally, replace your_license_key with your actual license key.

Shadow

jhcrash

  • Active Member
  • ***
  • Posts: 51
  • Karma: +2/-0
Re: yshout 5
« Reply #5 on: February 03, 2009, 03:06:08 PM »
Thanks for that Shadow  ;)
.. will try it ASAP and let ya know how i get on

Johnny

jhcrash

  • Active Member
  • ***
  • Posts: 51
  • Karma: +2/-0
Re: yshout 5
« Reply #6 on: February 04, 2009, 06:14:48 PM »
ok
.. I installed yshout in a home directory (outside of etano) and it worked (not intrgrated with etano)
I then tried the hack as above to intergrate it with etano and it didnt work.

I then installed it in the directory /etano/3rdparty/yshout/  .. but it  didnt work (not evan when intrgrated with etano)

Note: When i installed etano i had to include "SetEnv DEFAULT_PHP_VERSION 5" in the Root etano htacces file to get etano to work
So this is obviously preventing yshout from working within etano. But works outside the directory of etano.

Any ideas on how i can get this to work ... anyone  ;)

Thanks

Johnny

admin2

  • Guest
Re: yshout 5
« Reply #7 on: February 05, 2009, 03:41:27 PM »
Not familiar with your server environment but what if you put
SetEnv DEFAULT_PHP_VERSION 4 in 3rdparty/yshout/ ?

jhcrash

  • Active Member
  • ***
  • Posts: 51
  • Karma: +2/-0
Re: yshout 5
« Reply #8 on: February 05, 2009, 05:45:22 PM »
Hi Dan
... Thanks for the reply
Yep that works .. I created an htacces file and added "SetEnv DEFAULT_PHP_VERSION 4"

But the script above to intergarate the yshout into etano .. Dosent remove the nickname txt box .. and although it picks up the cookie username and adds it for you in the nick txt box .. you can still remove the cookie nick and type anything you like
... And so leaves the shout box open to abuse!

I have looked around and tried to remove the nick txt box so it simply adds the nick to a message without giving members the ability to change it .. But coulnt find the line to delete the option.

Has anyone else found it ?

Thanks in advance

Johnny

jhcrash

  • Active Member
  • ***
  • Posts: 51
  • Karma: +2/-0
Re: yshout 5
« Reply #9 on: February 06, 2009, 05:37:05 PM »
Ok
.. i found the answer  ;)
It does'nt stop the craftiest of users, but you can simply hide the username input box via CSS; give it display: none; and then it won't show up, and people won't be able to set it directly.

Sorted  :)

Johnny