Hi, everybody.
I've got here a new (for me) problem with a spy mod.
As admin I can not handle with a bx_spy_guest_allow param.
In other words:
I still see a Spy Block on a .../m/spy and .../modules/?r=spy pages even I am a Guest (logged out).
Is there already a solution for it? Please give me a link.
------------
The story is, that the Spy Block has only 2 places to show itself: Dashboard (member) and so to say Spy Index - which there is not in Page Compose.
Actually all I need is to assign "visible only for members" for that Block on Spy Index.
-----------------
Has Anyone a solution for it?
|
Sorry, I understood it wrong.
bx_spy_guest_allow param allows us to see Guest Activities.
And I need to let the Guests not to see my members Activities.
How can I do it?
Greet
|
I give a hint:
In a place that is bold must be inserted something like "$ifMember" or kind of this.
I hope this will help.
Kind regards.
I wish good luck.
---------------------------------------
/** * Function will generate global spy's page (content activity only!); * * @param : $sType (string) - type of activity; * @return : (text) - html presentation data; */ function getActivityPage($sType = '') { if($sType) { $this -> oSearch -> aCurrent['restriction']['type']['value'] = $sType; }
$this -> oSearch -> aCurrent['restriction']['viewed']['value'] = '';
$sPageUrl = $this -> sPathToModule;
// define page's mode switch($this -> sSpyMode) { case 'friends_events' : //-- if member not logged function will draw login form --//; if(!$this -> iMemberId ) { return member_auth(0); }
$this -> oSearch -> aCurrent['join'][] = array( 'type' => 'INNER', 'table' => $this -> _oDb -> sTablePrefix . 'friends_data', 'mainField' => 'id', 'onField' => 'event_id', 'joinFields' => array(), );
$this -> oSearch -> aCurrent['restriction']['friends']['value'] = $this -> iMemberId; $this -> oSearch -> aCurrent['restriction']['no_my']['value'] = $this -> iMemberId; $sPageUrl .= '&mode=' . $this -> sSpyMode; break;
default : }
// try to define activity type; if($sType) { $sPageUrl .= '&spy_type=' . $sType; }
// get data; $aActivites = $this -> oSearch -> getSearchData(); $sActivites = $this -> _proccesActivites($aActivites);
if($aActivites) { // add global wrapper for all events; $sOutputCode = '<div id="' . $this -> sEventsWrapper . '">' . $sActivites . $this -> oSearch -> showPagination($sPageUrl) . '</div>'; } else { $sOutputCode = '<div id="' . $this -> sEventsWrapper . '">' . MsgBox( _t('_Empty') ) . '</div>'; }
// if first page; if ($this -> iPage == 1) { $sOutputCode = $this -> getInitPart($sType) . $sOutputCode; }
return $sOutputCode; }
------------------------------------
... am waiting for a solution
|
|
Not sure if this is what your after, just uncheck the "guest" settings in the "navigation menu" therefore rendering invisible to guest...
ManOfTeal.COM a Proud UNA site, six years running strong! |
Not sure if this is what your after, just uncheck the "guest" settings in the "navigation menu" therefore rendering invisible to guest...
All possible to uncheck is uncheckt already - is still to see for guests... :(
|
Normally if you uncheck the guest option under the navigation builders for that Spy, then Guest will not see it in the menu. Kids first |
Normally if you uncheck the guest option under the navigation builders for that Spy, then Guest will not see it in the menu.
yes in the menu. but there is a BUG and I want to get it clear. Check it yourself - log out and point your address bar to www.whatever.com/m/spy -
what you see? well your spy box.
applause to me :)
|
Hello the variable you did use is wrong
Just try so:
This is the variable to say that it is DIFFERENT from a member: if(!isMember())
This is the variable to say IT'S a member: if(!isLogged() !=true) (just a little trick to say it's not a guest)
Let me know if it will work this way.
|
Hello the variable you did use is wrong
Just try so:
This is the variable to say that it is DIFFERENT from a member: if(!isMember())
This is the variable to say IT'S a member: if(!isLogged() !=true) (just a little trick to say it's not a guest)
Let me know if it will work this way.
Standing ovations! Bravo. The only little thing, that I really do not know where to put it right... I am sorry I can only guess, but guess right.
I need a remake to try it. Sorry. Can you prepere it for me? I will try it on my site.
|
I'll try to help
Just tell me which file is (where you did$ take the code above), and it's path
Thank
|
I'll try to help
Just tell me which file is (where you did$ take the code above), and it's path
Thank
here you are: /whatever/html/modules/boonex/spy/classes/BxSpyModule.php
|
Here is the solution
it will hide all the contents of the activities if is a guest.
Let me know if it's ok:
if($aActivites) { // add global wrapper for all events; $sOutputCode = '<div id="' . $this -> sEventsWrapper . '">' . $sActivites . $this -> oSearch -> showPagination($sPageUrl) . '</div>'; }
REPLACE WITH:
if($aActivites) { if(!isLogged() !=true) // add global wrapper for all events; $sOutputCode = '<div id="' . $this -> sEventsWrapper . '">' . $sActivites . $this -> oSearch -> showPagination($sPageUrl) . '</div>'; }
JOOsocial
|
Here is the solution
it will hide all the contents of the activities if is a guest.
Let me know if it's ok:
if($aActivites) {
// add global wrapper for all events; $sOutputCode = '<div id="' . $this -> sEventsWrapper . '">' . $sActivites . $this -> oSearch -> showPagination($sPageUrl) . '</div>'; }
REPLACE WITH:
if($aActivites) { if(!isLogged() !=true) // add global wrapper for all events; $sOutputCode = '<div id="' . $this -> sEventsWrapper . '">' . $sActivites . $this -> oSearch -> showPagination($sPageUrl) . '</div>'; }
JOOsocial
jup. all clear. iit works. box is empty. the only thing it would be perfect to see following a good customs, a EMPTY or ERROR or better YOU HAVE NORIGHTS TO SEE IT; PLEASE JOIN(a link to join.php i can add myself :) )
You are great if you do it.JOOsocial. SHAME on Boonex.
This site is awarded to get a name - User help User for 1.000 $ members fee :)
|
I'll try
Give me several minutes
JOOsocial
|
I'll try
Give me several minutes
JOOsocial
I'm happy to...
|
I have checked the code again and again.
I am sorry but this mod is made in a strange way and I am really confused.Infact if I add a message for guests it appear only for one tab, but disappears for all the others.this is not good.I should need more time probably, but until now the only good solution is only to hide the contents.If I will find something better, I'll post it here.
Regards
JOOsocial
|
I have checked the code again and again.
I am sorry but this mod is made in a strange way and I am really confused.Infact if I add a message for guests it appear only for one tab, but disappears for all the others.this is not good.I should need more time probably, but until now the only good solution is only to hide the contents.If I will find something better, I'll post it here.
Regards
JOOsocial
Shame on boonex, you rulez. Thamnk you for this session.
|
I have found the solution.
FIND:
// get data; $aActivites = $this -> oSearch -> getSearchData(); $sActivites = $this -> _proccesActivites($aActivites);
if($aActivites) { // add global wrapper for all events; $sOutputCode = '<div id="' . $this -> sEventsWrapper . '">' . $sActivites . $this -> oSearch -> showPagination($sPageUrl) . '</div>'; } else { $sOutputCode = '<div id="' . $this -> sEventsWrapper . '">' . MsgBox( _t('_Empty') ) . '</div>'; }
// if first page; if ($this -> iPage == 1) { $sOutputCode = $this -> getInitPart($sType) . $sOutputCode; }
return $sOutputCode; }
REPLACE WITH:
// get data; $aActivites = $this -> oSearch -> getSearchData(); $sActivites = $this -> _proccesActivites($aActivites); if(!isLogged() !=true) if($aActivites) { // add global wrapper for all events; $sOutputCode = '<div id="' . $this -> sEventsWrapper . '">' . $sActivites . $this -> oSearch -> showPagination($sPageUrl) . '</div>';
}else { $sOutputCode = '<div id="' . $this -> sEventsWrapper . '">' . MsgBox( _t('_Empty') ) . '</div>'; } if(!isLogged() !=false){ $sOutputCode = '<div id="' . $this -> sEventsWrapper . '">You must be logged in order to use this feature, <a href="' . $site["URL"] . 'member.php">LOGIN</a> or <a href="' . $site["URL"] . 'join.php">REGISTER</a></div>'; }
// if first page; if ($this -> iPage == 1) { $sOutputCode = $this -> getInitPart($sType) . $sOutputCode; }
return $sOutputCode; }
IT SHOULD WORK.LET ME KNOW
JOOsocial
|
Gloria in excelsis Deo! Angels singing in my heart!
All works. Thank you! This could be used as a solution for D7.0.1
Boonex pay attention on this!!!
|
Hi there!
Is there any solution for version D7.0.3. too? The code in BxSpyModule.php is different to Version D7.0.0. and D7.0.1.
Best Regards
|