1
jwells
Re: How do I force blocks??
  • 2005/2/11 19:44

  • jwells

  • Just popping in

  • Posts: 5

  • Since: 2004/10/17


Hmmm, is there no one who knows the answer to this?



2
jwells
How do I force blocks??
  • 2005/2/10 18:24

  • jwells

  • Just popping in

  • Posts: 5

  • Since: 2004/10/17


Greetings,

I am working on an intranet portal, and have run into a snag. When a user clicks on one of the menu items, it takes them to a custom module I have built for the intranet. The module displays the block I have built without issue, however, they would like me to add another block when certain criteria is met. Unfortunately, everything I have tried has failed here. :(

Basically, when a user goes to this module, the center column brings up the main module page with various options. When they click one of the options, they would like it to reload the page, but this time have an extra block in the right column.

Would some be kind enough to explain this to a XOOPS / PHP newb please? BTW, this feature will be used in at least 2 other custom modules they want me to build.



3
jwells
Re: xoopsDB help needed please
  • 2004/12/30 19:42

  • jwells

  • Just popping in

  • Posts: 5

  • Since: 2004/10/17


BINGO!!!!

Yes, the page is being called via GET. I changed the update statements and they all fire correctly. Thank you so much.



4
jwells
xoopsDB help needed please
  • 2004/12/30 19:08

  • jwells

  • Just popping in

  • Posts: 5

  • Since: 2004/10/17


Greetings,

I am writing my first package for xoops, or I should say re-writing it as I originally wrote a small tool using native PEAR:B calls to read and write data to my DB. Now I am in the process of converting it to use xoopsDB calls instead. While the select statements are working correctly, the update statements are failing miserably.

I have the following SQL update statement

$sql = sprintf("UPDATE envStats SET envStatus=2,envChangedBy='%s' WHERE UID='%s'", $thisUser, $_GET['envUp']);
$xoopsDB->query($sql);

Once, and once only have I even seen this get to the MySQL server. Looking at various code throughout the XOOPS core, I see similar statements being used fairly often, and they appear to be working correctly, however, this one does not seem to get to the MySQL server.

To help troubleshoot this issue, I added;

print($sql ."
\n");


It printed out;

UPDATE EnvStats SET envStatus=2,envChangedBy='jwells' WHERE UID='5'

So at this point, I know it is creating the correct MySQL update command. I turned on SQL logging and watched it while I ran this script and saw multiple select statements, by XOOPS and my script and one update statement called by XOOPS to update xoops_session.

So my question is, how can I force XOOPS to send the update statement to MySQL?



5
jwells
Accessing user Info in custom block
  • 2004/10/17 1:51

  • jwells

  • Just popping in

  • Posts: 5

  • Since: 2004/10/17


Greetings,

I have created custom block that for my companies new portal site that allows people to see the current status of various clusters in our network fabric. In addition, registered users have the ability to take a cluster off line. When they do this, I would like to capture the user name they logged in with and record it to the database. I have already figured out how to online or offline the cluster from within the custom block, however, I haven't been able to figure out who the user is that is changing the state of the cluster. So my question is;

Within the custom block, how do I determine the user that is changing the cluster state?

Unfortunately, I am very new to PHP and XOOPS and have no clue what "globals" XOOPS provides to the custom PHP blocks. Any help in this would be very greatly appreciated.




TopTop



Login

Who's Online

136 user(s) are online (39 user(s) are browsing Support Forums)


Members: 0


Guests: 136


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits