1
solaris365
Re: 'Recent News' block only on Index-page of WF-Channel?
  • 2006/5/1 15:27

  • solaris365

  • Just popping in

  • Posts: 22

  • Since: 2004/8/8 8


Thank Quest. This I did, but it was not enough.
Meanwhile I wrote a small Hack that does the trick.

At the end of the function b_news_top_show() in the file news_top.php of the News-Module I check the name of the directory the current module (here: 'wfchannel') and the combination of get-params.

If it indicates that the current page is the index-page I do nothing (1), but if the get-params indicate the its a subpage I empty the array with the new content (2), with the result that the news block remains empty/is not shown.

if ( $xoopsModule->getVar('dirname') == 'wfchannel') {

   if ( empty(
$_GET) || 
     (
$_GET['sel_lang'] && !$_GET['pagenum']) ) {
          
// ([b]1[/b]) let is pass to display
   
} else {
          
$block = Array(); // ([b]2[/b]) EMPTY BLOCK => NO NEWS
   
}
}



2
solaris365
'Recent News' block only on Index-page of WF-Channel?
  • 2006/4/30 8:58

  • solaris365

  • Just popping in

  • Posts: 22

  • Since: 2004/8/8 8


XOOPS Version: 2.0.9
Module Name/Version:WF-Channel 1.07
PHP Version: 4
XOOPS Setting: Module for start page: WF-Channel !!!

My Question: How can I have the 'Recent News' block (News Module, v1.4) only on Index-page of WF-Channel, but hide it on any other sub-page of the WF-Channel module? Example:

YES, ON index page:
-------------------
/modules/wfchannel/

BUT NOT on 'sub-pages' like e.g.:
----------------------------------
/modules/wfchannel/index.php?pagenum=1
/modules/wfchannel/index.php?pagenum=2
/modules/wfchannel/index.php?pagenum=3
or
/modules/wfchannel/index.php?op=link
/modules/wfchannel/index.php?op=refer

My idea would be a check of the current URL within the template file 'news_block_top.html' for the 'Recent News' block.
If the current URL is exactly == "/modules/wfchannel/", than display, otherwise do not display the Recent News block.

Exists a similar Hack like this already?
If not, in which variable i can find the current URL to check whether the current page is "/modules/wfchannel/" or "/modules/wfchannel/index.php?pagenum=1"?



3
solaris365
Re: Delete in module fails but in phpMyAdmin works
  • 2004/9/7 20:05

  • solaris365

  • Just popping in

  • Posts: 22

  • Since: 2004/8/8 8


Thanks Mithrandir,

with queryF it's working. Yes I am using the GET method. But I saw other modules also using vars form GET for their Delete statement. How can I know whether my 'HTTP Referer is block'?
Sorry that I insist, but am curious to understand.



4
solaris365
Delete in module fails but in phpMyAdmin works
  • 2004/9/7 11:27

  • solaris365

  • Just popping in

  • Posts: 22

  • Since: 2004/8/8 8


Hallo,
I am working on a new module for XOOPS using 5 database tables. All routines of inserting a new record and updating
existing records in my module work fine.

Just deleting records in any of my tables fails. When I copy the delete statement and use it in phpMyAdmin on the SAME tables the statement works successfully. So it doesn't seem to be a problem of syntax.

Is there anything special to remember when doing a delete with respect to an insert/update statement in Xoops?

Any hint, suggestion, comment is appreciated.

Tks, Solaris365




TopTop



Login

Who's Online

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


Members: 0


Guests: 210


more...

Donat-O-Meter

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

Latest GitHub Commits