Welcome, Guest
Please Login or Register.    Lost Password?

Adding an item to the event menu list
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Adding an item to the event menu list
#328
Adding an item to the event menu list 5 Years, 7 Months ago Karma: 0
I want to add a link to a remository item to download our rules for the LAN. I want the link to appear in the eventmenu list, right after "Participants" in the list.

I've got the link added, but it appears at the top, even above the name of the LAN.

How would I get it to be a part of the list?

www.uqlan.com to see what I mean.
g0t0pless
g0t0pless
Senior Boarder
Posts: 46
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#331
Re:Adding an item to the event menu list 5 Years, 7 Months ago Karma: 9
Some knowledge of HTML (and some PHP) should do the trick

You modified the mod_mls_eventmenu.php I suppose?

If you can give me the file, I can fix it for you. But it will be static, not dynamic.
moensch
moensch
Administrator
Posts: 678
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#332
Re:Adding an item to the event menu list 5 Years, 7 Months ago Karma: 0
modules/mod_mls_eventmenu.php
Code:

<?php
/**
* myLANsite Eventmenu Module
* @author Samuel Suter <samuel.suter@gmx.ch>
* @version 0.0.2
**/

defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
//require_once("../configuration.php"«»);
// load language files
require_once( $mainframe->getPath( 'class', 'com_mls_lang' ) );
$l = new MLS_lang('','','mod_mls_eventmenu');
if(!$l->loadData()) {
echo $l->_error;
}

$params = $params->_params;
$showmax = @$params->showmax ? $params->showmax : 3;
$eventid = mosGetParam($_REQUEST,'eventid');
$option = mosGetParam($_REQUEST,'option');
if(!$eventid AND (eregi('mls',$option) OR $params->openactive)) {
//if no eventid is given and we are ona mylansite related page and option to open up active menu is enabled
//select the active event's id
$database->setQuery( "SELECT `id` FROM `#__mls_events` WHERE `active`='1' LIMIT 1" );
$eventid = $database->loadResult();
}
$now = date("Y-m-d H:i:«»s",time() + @$mosConfig_offset * 60 * 60);
$database->setQuery( "SELECT * FROM `#__mls_events` WHERE `published`='1' AND `start`>'".$now."' ORDER BY `start` ASC LIMIT ".$showmax );
$rows = $database->loadObjectList();

?>
<table cellspacing="0" cellpadding="0" class="moduletable" align="center">
<tr>
<td valign="top" align="center">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<?php for($i = 0; $i < count($rows); $i++) {
$event = $rows[$i];
?>
<tr align="left"><td><a href="<?php echo sefRelToAbs("index.php?option=com_mls_events&task=details&eventid=".$event->id);?>" class="mainlevel" ><?=$event->name; ? ></a></td></tr>
<?php if($event->id == $eventid) { ?>
<?php if($params->details == 1) {?><tr align="left"><td><a href="<?=sefRelToAbs("index.php?option=com_mls_events&task=details&eventid=".$event->id);?>" class=" sublevel" ><?=$l->m("details"«»); ?></a></td></tr><?php } ?>
<?php if($params->participants == 1) {?><tr align="left"><td> <a href="<?=sefRelToAbs("index.php?option=com_mls_events&task=show_participants&eventid=".$event->id);?>"  class="sublevel" ><?=$l->m("participants"«»); ?></a></td></tr><?php } ?>
<a href="http://uqlan.com/index.php?option=com_remository&Itemid=36&func=fileinfo&id=2">Rules</a>
                                              <?php if($params->reviews == 1) {?><tr align="left"><td><a href="<?=sefRelToAbs("index.php?option=com_mls_events&task=list_reviews&eventid=" .$event->id);?>" class="sublevel" ><?=$l->m("reviews"«»); ?></a></td></tr><?php } ?>
<?php if($params->comments == 1) {?><tr align="left"><td><a href="<?=sefRelToAbs("index.php?option=com_mls_events&task=list_comments&eventid=".$event->id);?>" class=" sublevel" ><?=$l->m("comments"«»); ?></a></td></tr><?php } ?>
<?php if($params->tournaments == 1) {?><tr align="left"><td><a href="<?=sefRelToAbs("index.php?option=com_mls_tournaments&eventid=".$event->id);?>" class="sublevel"  ><?=$l->m("tournaments"«»); ?></a></td></tr><?php } ?>
<?php if($params->seatmap == 1) {?><tr align="left"><td><a href="<?=sefRelToAbs("index.php?option=com_mls_seatmap&eventid=".$event->id);?>" class="sublevel" ><? =$l->m("seatmap"«»); ?></a></td></tr><?php } ?>
<?php } ?>
<?php } ?>
<?php if($params->event_list == 1) {?><tr align="left"><td><span class="mainlevel" > </span></td></tr><?php } ?>
<?php if($params->event_list == 1) {?><tr align="left"><td><a href="<?=sefRelToAbs("index.php?option=com_mls_events"«»); ?>" class="mainlevel" ><?=$l->m(" event_list"«»); ?></a></td></tr><?php } ?>
</table>
</td>
</tr>
</table>



You should be able to see the line I added where I wanted it to appear in the list. It's simply a link to our rules file in the remository component.<br><br>Post edited by: g0t0pless, at: 2006/07/11 19:36
g0t0pless
g0t0pless
Senior Boarder
Posts: 46
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#333
Re:Adding an item to the event menu list 5 Years, 7 Months ago Karma: 9
Yes. You forgot to add a new table row (tr) and table cell (td). A line should look like this:

Code:

&lt;tr align=&quot;left&quot;&gt;&lt;td&gt; &lt;a href=&quot;(whatever)&quot; class=&quot;sublevel&quot; &gt;TEXT&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
moensch
moensch
Administrator
Posts: 678
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#363
Re:Adding an item to the event menu list 5 Years, 5 Months ago Karma: 0
I finally got around to fixing this issue with our event menu.

Thanks, it worked like a charm.

So here is another question about it, maybe this can be used with the next version of this module?

I would like to see:

When a user logs in to the site, he sees the following items in his event menu:

Details
Rules
Register (grayed out)
Pay (grayed out)
Participants
Seating Chart (grayed out)
Tournaments (grayed out)

The first thing he'd have to do is agree tot he rules. Once he agrees, the &quot;register&quot; item would become available.

Once he registers, &quot;register&quot; would be grayed out, and &quot;pay&quot; would become available. Then, once he paid, &quot;tournaments&quot; and &quot;seating chart&quot; would be available.

This would make the event list kind of become a checklist of items to do to fully rgister.

Agree to the rules, register, then pay, get his seat, then sign up for tournaments.

I have no clue how you'd implement this, but I'm sure you'd know how.

Instead of graying out items, maybe use the same checkmarks and X's you use for the paid/ not paid screen in the backend? I don't know, just some kind of visual cue that there are items to do before you are fully registered.
g0t0pless
g0t0pless
Senior Boarder
Posts: 46
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
Moderators: moensch