xoops forums

Forum Index


Board index » All Posts (kevinv)




kevinv

Friend of XOOPS
Posted on: 2006/6/26 21:00
kevinv
kevinv (Show more)
Friend of XOOPS
Posts: 44
Since: 2003/1/4 1
#1

Re: Call Module direct from Theme without Block?

I solved this by playing tricks with the columns & weights. I have a theme that is 2-column, so I placed blocks I wanted in non-standard locations in the right-most column and then assigned weights to the particular blocks that went in certain places. For example, I have a search block up in the header. To place this block I put the search block in the right column and assign it a weight of 1. Then in my theme I have:

<{foreach item=block from=$xoops_rblocks}>
   <{if 
$block.weight == 1}>
      <
div id="search"><{$block.content}></div>
   <{/if}>
<{/foreach}>


Note if you have a lot of blocks on the right this will be very slow looping through them all!


kevinv

Friend of XOOPS
Posted on: 2006/6/3 19:36
kevinv
kevinv (Show more)
Friend of XOOPS
Posts: 44
Since: 2003/1/4 1
#2

Re: Fetching all submenus in main menu

I solved this by modifying the code. Not sure if it's the only solution.

Find the system_blocks.php then find the line:
if ((count($sublinks) > 0) && (!empty($xoopsModule)) && ($i == $xoopsModule->getVar('mid'))) {


and change it to:
if ((count($sublinks) > 0) && (!empty($xoopsModule))) {


kevinv

Friend of XOOPS
Posted on: 2006/6/3 19:14
kevinv
kevinv (Show more)
Friend of XOOPS
Posts: 44
Since: 2003/1/4 1
#3

Fetching all submenus in main menu

I'm trying to modify the main menu block to show ALL sub-menu items, not just the ones in the current module.

The main menu block uses the following to build the menu:

<!-- start module menu loop -->
<{foreach item=module from=$block.modules}>
<a class="menuMain" href="<{$xoops_url}>/modules/<{$module.directory}>/"><{$module.name}></a>
<{foreach item=sublink from=$module.sublinks}>
<a class="menuSub" href="<{$sublink.url}>"><{$sublink.name}></a>
<{/foreach}>
<{/foreach}>
<!-- end module menu loop -->


Apparently $module.sublinks is only filled out for the current module. Are the other sub-menus available in a different smarty variable, or does this require a code change?


kevinv

Friend of XOOPS
Posted on: 2006/6/3 15:35
kevinv
kevinv (Show more)
Friend of XOOPS
Posts: 44
Since: 2003/1/4 1
#4

Re: Smarty debug broken?

heh, who reads documentation. actually i read it before i upgraded, but that was days ago and that part didn't stick in my head.

I did check the bugs site and didn't see anything there.

thanks.


kevinv

Friend of XOOPS
Posted on: 2006/6/3 15:14
kevinv
kevinv (Show more)
Friend of XOOPS
Posts: 44
Since: 2003/1/4 1
#5

Re: Smarty debug broken?

duh, wrong XOOPS version listed.

2.0.14-RC1 is what i have installed.


kevinv

Friend of XOOPS
Posted on: 2006/6/3 15:13
kevinv
kevinv (Show more)
Friend of XOOPS
Posts: 44
Since: 2003/1/4 1
#6

Re: Check modules at center block

In the default theme there is a line:

<{if $xoops_showcblock == 1}>

not sure what controls turning on $xoops_showcblock, but if it's set to zero no blocks will be shown. Perhaps an <{else}> clause to that will do what you want?


kevinv

Friend of XOOPS
Posted on: 2006/6/3 15:08
kevinv
kevinv (Show more)
Friend of XOOPS
Posts: 44
Since: 2003/1/4 1
#7

Smarty debug broken?

I recently upgraded to 2.0.14.2 and the smarty debug option seems to be broken. The other 2 debug options work fine. Anyone else seen this?

Apache 2
PHP 5.1.4
register_globals off
safe_mode off


kevinv

Friend of XOOPS
Posted on: 2004/7/18 11:09
kevinv
kevinv (Show more)
Friend of XOOPS
Posts: 44
Since: 2003/1/4 1
#8

Informative Modules Descriptions

I was just browsing the Modules download section and I have a request of the module developers out there: when you post your module PLEASE have an description of what the module does, NOT a description of what you did to the module.

I have no idea if I want to use your module if the description is "lots of bug fixes since last release and now there is a sub-menu in the main menu".

You could have the coolest module in the world but I'll never find it if the description doesn't tell me what it actually does.

Put the changelog of what you did after the functional description.

I don't mean to harp on this, i know you put a lot of work into your modules and I appreciate it as 3 or 4 modules I've downloaded have saved me a lot of time. But there could be another 10 modules I'd be using if I only knew what they did.

Kevin


kevinv

Friend of XOOPS
Posted on: 2004/3/23 4:09
kevinv
kevinv (Show more)
Friend of XOOPS
Posts: 44
Since: 2003/1/4 1
#9

Re: ip address auto login

there is no configuration option for this.

I assume you still want people with particular ip's to log in with a password, but only people from those certain ip's can turn on the auto-login option.

Easiest way I can think of is to modify the autologin code (see the wiki for how to enable this code) and add some code to only show the auto-login check box for particular ip addresses.

I'd probably add code to the cookie saving part to ensure only particular ip's get the auto-save cookie create (prevents problem with people hacking in the auto-login info from outside the form).

If you're looking to have people from particular ip's automatically logged in without having a password I highly recommend against this. IP's are easily spoofed.


kevinv

Friend of XOOPS
Posted on: 2004/3/18 1:46
kevinv
kevinv (Show more)
Friend of XOOPS
Posts: 44
Since: 2003/1/4 1
#10

Re: If I....

change the mainfile.php in the root.

things you might need to change:
absolute path to files
database username/password
database name (as opposed to table names which should not change)

I believe all of these are stored in the mainfile.php. Don't think there are any records in the db that might need to be updated, but someone can correct me on that.



TopTop
(1) 2 3 »