31
dargosch
Hacking Mainmenu?
  • 2006/5/2 18:53

  • dargosch

  • Friend of XOOPS

  • Posts: 118

  • Since: 2004/12/21


Hi,

I am trying to hack the main menu so that it will not display itself when coming from a specific module (i.e. HTTP_REFERER contains a specific module name). Instead, I want it to refer back to the refering page.

This is the template i use:

<table cellspacing="0">
  <
tr>
    <
td id="mainmenu">
    <{if 
$block.LinkBack != 1}>
      <
class="menuTop" href="<{$xoops_url}>/"><{$block.lang_home}></a>
      <!-- 
start module menu loop -->
      <{foreach 
item=module from=$block.modules}>
      <{if 
$module.directory == "piCal"}>
<
class="menuMain" href="<{$xoops_url}>/modules/<{$module.directory}>/?cid=1&smode=Monthly"><{$module.name}></a>      
      <{else}>
<
class="menuMain" href="<{$xoops_url}>/modules/<{$module.directory}>/"><{$module.name}></a>
     <{/if}>
        <{foreach 
item=sublink from=$module.sublinks}>
          <
class="menuSub" href="<{$sublink.url}>"><{$sublink.name}></a>
        <{/foreach}>
      <{/foreach}>
      <!-- 
end module menu loop -->
   <{else}>
     <
a href="<{$block.BackLink}>">[en]Back to club page[/en][sv]Tillbaka till klubbsidan[/sv]</a>
    <{/if}>
   </
td>
  </
tr>
</
table>


So, the menu does not show when LinkBack is set. Now, I have modified the system_blocks.php like this:

#Link back
    
if( isset($_SESSION['klubbsida']) ){
        
$ref parse_url($_SERVER['HTTP_REFERER']);
    
$refpath pathinfo($ref['path']);
    
$refdir $refpath['dirname'];

        
$curr parse_url($_SERVER['QUERY_STRING']);
    
$currpath pathinfo($curr['path']);
    
$currdir $currpath['dirname'];

    if(
strcmp($currdir,$refdir) == 0){
        
#Same module
       
$block['LinkBack'] = 1;
       
$block['BackLink'] = $_SESSION['klubbsida'];
    }


    }
    else{
# ------- This works ------------
        
if( substr_count($_SERVER['HTTP_REFERER'],"content") > && strcmp($XOOPS_URL,$_SERVER['QUERY_STRING']) != ){
            
$block['LinkBack'] = 1;
        
        
$_SESSION['klubbsida'] = $_SERVER['HTTP_REFERER'];
        
$block['BackLink'] = $_SESSION['klubbsida'];
        }
# ------- End This works ------------
  # }
    
return $block;
}


With this code, I get a link back, but when I click on a link internal to the module, I would like the link back to remain what it was when I entered the module. This does not work.

As you can see, I am trying to get this behaviour to work when entering a module from the 'content' module.

Any ideas?

/Fredrik
My Gentoo + PVR-350 + IVTV + MythTV blog is on
http://gentoomythtv.blogspot.com/



32
dargosch
Hit statistics of a specific page?
  • 2006/2/25 17:30

  • dargosch

  • Friend of XOOPS

  • Posts: 118

  • Since: 2004/12/21


Hi,

Is there a way to get hit statistics of a specific page in, for instance, the contents module?

/Fredrik
My Gentoo + PVR-350 + IVTV + MythTV blog is on
http://gentoomythtv.blogspot.com/



33
dargosch
Re: Moving from Localhost to a REAL server
  • 2006/2/17 9:57

  • dargosch

  • Friend of XOOPS

  • Posts: 118

  • Since: 2004/12/21


My Gentoo + PVR-350 + IVTV + MythTV blog is on
http://gentoomythtv.blogspot.com/



34
dargosch
Re: XOOP DB backup & restore -- Email the backup, not just a link..
  • 2006/2/7 15:43

  • dargosch

  • Friend of XOOPS

  • Posts: 118

  • Since: 2004/12/21


Hi,

Really, doesn't anyone make backups of their remote sites?

/Fredrik
My Gentoo + PVR-350 + IVTV + MythTV blog is on
http://gentoomythtv.blogspot.com/



35
dargosch
XOOP DB backup & restore -- Email the backup, not just a link..
  • 2006/1/30 23:04

  • dargosch

  • Friend of XOOPS

  • Posts: 118

  • Since: 2004/12/21


Hi,

I have seen the email feature of the XOOP DB backup & restore module, but every time I try it, I get an email with a link to the archive, not the archive itself. Since the space on my ISP is rather limited, I would like to achive the backup in my email, rathern than the on the server.

How do I get this?
Table-by-table backup is ok, as long as I get to send the data..

/Fredrik
My Gentoo + PVR-350 + IVTV + MythTV blog is on
http://gentoomythtv.blogspot.com/



36
dargosch
Re: mail_password: could not update user entry. Contact the Administrator
  • 2006/1/26 11:45

  • dargosch

  • Friend of XOOPS

  • Posts: 118

  • Since: 2004/12/21


Hi,

The 2.2.4 patch seems to have fixed the rpoblem for me. The picture uploads hack had to be removed though..

/Fredrik
My Gentoo + PVR-350 + IVTV + MythTV blog is on
http://gentoomythtv.blogspot.com/



37
dargosch
Re: Not very informative message
  • 2006/1/26 11:44

  • dargosch

  • Friend of XOOPS

  • Posts: 118

  • Since: 2004/12/21


Hi,

The 2.2.4 patch seems to have fixed the rpoblem for me. The picture uploads hack had to be removed though..

/Fredrik
My Gentoo + PVR-350 + IVTV + MythTV blog is on
http://gentoomythtv.blogspot.com/



38
dargosch
Re: mail_password: could not update user entry. Contact the Administrator
  • 2006/1/24 22:32

  • dargosch

  • Friend of XOOPS

  • Posts: 118

  • Since: 2004/12/21


Hi again,

Sorry to hijack this thread, but i still cannot generate a new password, and I cannot modify a user. See this thread:

https://xoops.org/modules/newbb/viewtopic.php?topic_id=46145&forum=20&post_id=203024#forumpost203024

Now, if I try to register a fake user, I get this message:

Could not register new user.


right after I click the Finish button.

What is this? I am using XOOPS 2.2.3 with xLanguage-eid Profile fields and the user Photos hack.

/Fredrik
My Gentoo + PVR-350 + IVTV + MythTV blog is on
http://gentoomythtv.blogspot.com/



39
dargosch
Send mail to users, with attachements?
  • 2006/1/24 12:37

  • dargosch

  • Friend of XOOPS

  • Posts: 118

  • Since: 2004/12/21


Hi,

I would like to send mail to members of a group or groups and include an attachement. The email users facility of XOOPS does not do that anymore, and Xmail development are not ready yet (at least there are no complete language files).

So, what are my options?

/Fredrik
My Gentoo + PVR-350 + IVTV + MythTV blog is on
http://gentoomythtv.blogspot.com/



40
dargosch
Re: mail_password: could not update user entry. Contact the Administrator
  • 2006/1/24 12:23

  • dargosch

  • Friend of XOOPS

  • Posts: 118

  • Since: 2004/12/21


Please, someone.. What do I do with this?

/Fredrik
My Gentoo + PVR-350 + IVTV + MythTV blog is on
http://gentoomythtv.blogspot.com/




TopTop
« 1 2 3 (4) 5 6 7 ... 12 »



Login

Who's Online

142 user(s) are online (92 user(s) are browsing Support Forums)


Members: 0


Guests: 142


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