121
blackrx
Re: How do I add a simple webpage to a xoops themed site?
  • 2009/11/8 2:43

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


Lol...thanks Ghia..now i get it...

you rock



122
blackrx
Re: How do I add a simple webpage to a xoops themed site?
  • 2009/11/8 0:39

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


based on
https://xoops.org/modules/newbb/viewtopic.php?post_id=316663#forumpost31666

ok bare with me...a newbie in mysl/php

i tried something like this but its not working..other user still can access the page

if (is_object($xoopsUser)) {
   
$sql "SELECT uid FROM ".$xoopsDB->prefix("users")." WHERE uid NOT IN (1) AND NOT IN (34)"
    
    
$result $xoopsDB->query($sql);
    
    if (
$result && $xoopsDB->getRowsNum($result) > 0) { 
 { 
        
redirect_header(XOOPS_URL5_NOPERM);
        exit();
    }
}



123
blackrx
Re: How do I add a simple webpage to a xoops themed site?
  • 2009/11/8 0:36

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


Quote:

ghia wrote:
if (is_object($xoopsUser)) {
  
$groups $xoopsUser->getGroups();
} else {
  
$groups XOOPS_GROUP_ANONYMOUS;
}

Then check if the required group is present.
if(is_object($xoopsUser)) {
  
$uid $xoopsUser->getVar('uid');
}
else

  
$uid 0;
}
Then check $uid is the required one.



Ghia can you show me example ?

so if i want so only user id=1 and 34 can access this page..what should i modify and put the user ID ?

if (!$userisok) {
    
redirect_header(XOOPS_URL.'/index.php'3_NOPERM);
    exit();
}


there is some possible solution here..
ban user from certain page

https://xoops.org/modules/newbb/viewtopic.php?post_id=316663#forumpost316663

it will ban users defined in a table
.but this will be difficult...cause i want to ban all users except2 users

user id 1 and 34

how do i modify the code ?



124
blackrx
Re: How do I add a simple webpage to a xoops themed site?
  • 2009/11/7 13:43

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


<{if $xoops_isadmin}>
echo 
"test - admin see this";
<{/if}>

<{if !
$xoops_isuser}>
echo 
"user see this";
<{/if}>


<{if 
$xoops_isadmin}> <!--condition if the real webmaster login-->
echo 
"what to do";
<{elseif 
$group_id == 4}> 
//<!--condition if the other webmaster login ("4" is the id of the group created before)-->
echo "something to do if first condition is false and this condition is true";
<{/if}>
?>


i test some of this code but

it seems smarty tags is not working in my page

keep getting
Parse error: syntax error, unexpected '<'



125
blackrx
Re: How do I add a simple webpage to a xoops themed site?
  • 2009/11/7 13:29

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


Quote:

ghia wrote:
if (is_object($xoopsUser)) {
  
$groups $xoopsUser->getGroups();
} else {
  
$groups XOOPS_GROUP_ANONYMOUS;
}

Then check if the required group is present.
if(is_object($xoopsUser)) {
  
$uid $xoopsUser->getVar('uid');
}
else

  
$uid 0;
}
Then check $uid is the required one.


i dont quite understand this...im quite newbie..thanks anyway Ghia


but i think i found a possible solution from this topic

will try if this works






126
blackrx
Re: 2009 XOOPS Website Redesign
  • 2009/11/7 9:08

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


thank you...keep up the good work

any update on new module repository...

babylon is nice




127
blackrx
Re: How do I add a simple webpage to a xoops themed site?
  • 2009/11/7 9:06

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


there is reason i want to use this.

i want it to be in my root

mysite.com/mypage.php

oh i made some search and i found this

$xoopsUser or redirect_header('index.php'3_NOPERM);


anonymous user will be redirect to index.php when they try to acces the page

but what about
Quote:

what if i want to restrict view of this page by user ID or by group ?


I don't want anonymous visitor or any other registered user to visit this page

how do i do this ?


what should i modify in the code



128
blackrx
Re: 2009 XOOPS Website Redesign
  • 2009/11/7 1:02

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


1. what is the purpose of the recent post block showing in the front page near bottom page when there is a block that show the same content above it ?

maybe it can be replace with the recent comment block

2. Lol love this wox theme....

i think that the theme selection in the sidebar should be removed
..when you select the default or zeta theme...the layout of xoops.org is not nice especially in front page...you can try it..it doesnt look nice and this will give wrong impression to new user...


congrats again to eduardo and xoops.org team for having this new theme



129
blackrx
Re: How do I add a simple webpage to a xoops themed site?
  • 2009/11/7 0:45

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


what if i want to restrict view of this page by user ID or by group ?


I don't want anonymous visitor or any other registered user to visit this page

how do i do this ?



130
blackrx
Re: Finding a Form
  • 2009/10/17 8:32

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


try mxdirectory/xdirectory/efqdirectory


https://xoops.org/modules/newbb/viewtopic.php?topic_id=69772&forum=4&post_id=318007#forumpost318007





TopTop
« 1 ... 10 11 12 (13) 14 15 16 ... 20 »



Login

Who's Online

327 user(s) are online (193 user(s) are browsing Support Forums)


Members: 0


Guests: 327


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