61
attock
Re: HowTO Display mySQL result page by page
  • 2007/3/31 1:28

  • attock

  • Not too shy to talk

  • Posts: 138

  • Since: 2006/8/20


no problemo



62
attock
Re: One click opens two links - Solved !!
  • 2007/3/31 1:27

  • attock

  • Not too shy to talk

  • Posts: 138

  • Since: 2006/8/20


Nevermind, did a little googling, and found this link.


I can use the followings:

<a href="http://www.google.com" onclick="window.open('http://www.yahoo.com');return true;">Google hereYahoo in a new window</a>



63
attock
One click opens two links
  • 2007/3/31 1:24

  • attock

  • Not too shy to talk

  • Posts: 138

  • Since: 2006/8/20


Hi,

I wana just the followings:

<a href='http://www.site1.com' onclick=" . "javascript:openWithSelfMain('http://www.popup1.com/','popup',10,10);" ."> </a>"

i.e. open two website by one click, but I have a question. The above code seems to work only if I include the followings:

include '../../mainfile.php';
include(XOOPS_ROOT_PATH."/header.php");
.. mt stuff..
include(XOOPS_ROOT_PATH."/footer.php");

is there a way not to include root header and footer while achieveing the goal of opening two links with one click?


Thanks



64
attock
Re: HowTO Display mySQL result page by page
  • 2007/3/31 1:12

  • attock

  • Not too shy to talk

  • Posts: 138

  • Since: 2006/8/20


Sure, I can give it a try sumtimes. But it wont be happening any sooner, atleast not before start of summer. But if you got any questions, you can write me a pm I'll be more than happy to help you.


CheEeRss!!!



65
attock
HowTO Display mySQL result page by page
  • 2007/3/30 16:47

  • attock

  • Not too shy to talk

  • Posts: 138

  • Since: 2006/8/20


Hi,

Can somebody tell me howto display mySQL query's result (lets say 20) results on a page (one by one). I am good with using mySQL, just wana display result page by page.


Do I need to include any class for that, if so how?


Thank you.



66
attock
Re: - Required class?
  • 2007/3/19 17:01

  • attock

  • Not too shy to talk

  • Posts: 138

  • Since: 2006/8/20


Quote:
you have missed an opening brace '{' and then a closing '}' after the xoopsUser_isAdmin()


No actually I was trying to figure out which one of them works. Like comparing $xoopsUser->isAdmin() would return true or $xoops_isadmin. Is "$xoops_isadmin" a sub branch of $xoopsUser->isAdmin(), $xoops_isadmin is a variable anyway ?

Quote:
you can also get the uname from the uid by using > $uname_ = xoops_getLinkedUnameFromId($this->getVar('uid'));


I'll write this in my little blue book


Another Quick question

- What are the classes required for Including Comments System ?

- Is there a document on how to build a module / basic xooops classes\functions documents ?

That will make life very easy

Thanks for you time ~



67
attock
Re: - Required class?
  • 2007/3/19 14:09

  • attock

  • Not too shy to talk

  • Posts: 138

  • Since: 2006/8/20


Thanks for pointing out :)

but some mysterious resons $xoops_isadmin is not working, so this is what I am doing now. And it works fine for now:

if (is_object($xoopsUser)) { 
       
$uid $xoopsUser->getVar('uid'); 
       
$uname $xoopsUser->getVar('uname');  
      if (
$uname == "admin" || $uname == "attock") {            $musicadmin "yes";      
    }      }


if ($musicadmin) // so on...




68
attock
Re: - Required class?
  • 2007/3/19 13:14

  • attock

  • Not too shy to talk

  • Posts: 138

  • Since: 2006/8/20


more issue

okie this is what I have:
<?  include("../../mainfile.php"); 
include(
XOOPS_ROOT_PATH."/header.php"); 

global 
$xoopsUser
 if (
is_object($xoopsUser)) {    
  
$uid $xoopsUser->getVar('uid');  // I saw it another module
  
$uname_ $xoopsUser->getVar('uname');   // I saw it another module

   
echo "check if user..<br/>";   
   if (
$xoopsUser->isAdmin()) echo "xoopsUser->isAdmin() result is: True<br/>";
   if (
$xoops_isadmin"xoops_admin is: True<br/>";     
 }

    if (
$uname == "admin") {
      echo 
"If statemen via uname is: True"
 }
    else { 
     echo 
"uname != admin, instead uname is: $uname";
  }
  
?>


As Admin I get the following

check if user..
xoopsUser->isAdmin() result is: True
uname != admin, instead uname is:

As user I get
check if user..
uname != admin, instead uname is:

not as user
uname != admin, instead uname is:

---------------------

$xoopsUser->isAdmin() works fine, but if a non-admin login is, the page wont be displayed - it halts any things after $xoopsUser->isAdmin() in php file.

Another question: Why am I unable to get uid & uname. I have used it at other places too, it works fine.

Am I doing sumthing really stupid ?

The file is located: root/modules/modulename/filename.php
also, there are no blocks on this module - does it matter?

Thank you for time



69
attock
Re: - Required class?
  • 2007/3/18 22:52

  • attock

  • Not too shy to talk

  • Posts: 138

  • Since: 2006/8/20


I am sowwie, thats wht I mean

the if statement is not working.

Do I need to inculde anything, or is there anyway around?

thank you



70
attock
Re: - Required class?
  • 2007/3/18 17:16

  • attock

  • Not too shy to talk

  • Posts: 138

  • Since: 2006/8/20


okie, I have tried:
if ($xoops_isadmin) {  // do something  }


but it doesnt seem to be working.




TopTop
« 1 ... 4 5 6 (7) 8 9 10 ... 12 »



Login

Who's Online

191 user(s) are online (126 user(s) are browsing Support Forums)


Members: 0


Guests: 191


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