Deprecated: Assigning the return value of new by reference is deprecated in /home/gigcal/public_html/includes/joomla.php on line 836

Warning: Cannot modify header information - headers already sent by (output started at /home/gigcal/public_html/includes/joomla.php:836) in /home/gigcal/public_html/includes/joomla.php on line 697
gigCalendar.net
Home arrow Forum arrow gigCalendar 1.x Forum arrow Wishlist or Suggestions arrow Venue & Band Lists, Display Tweaks
Venue & Band Lists, Display Tweaks
Welcome, Guest. Please login or register.
May 25, 2013, 10:42:00 AM
Home Help Search Login Register

+  gigCalendar Forums
|-+  gigCalendar 1.x Forum
| |-+  Wishlist or Suggestions
| | |-+  Venue & Band Lists, Display Tweaks
« previous next »
Pages: [1] 2 Print
Author Topic: Venue & Band Lists, Display Tweaks  (Read 11172 times)
Brian Johnson
Jr. Member
**
Posts: 10



View Profile
« on: January 04, 2006, 01:31:20 PM »

Howdy,

gigCalendar is a great component- excellent work!

I'm buidling a Test Site for DesMoinesMC.com and my first task has been to evaluate gigCalendar.
We would like to use gigCalendar as Band and Venue Directories in addition to an Events Calendar.

I started by modifying gigcal.php, adding the following code to the "switch unit"

Code:
case 'venueslist':
  if($gigconfig['menu_top']) echo $gigcal_menu;
  require_once('venueslist.php');
  if($gigconfig['menu_bottom']) echo "<br />" . $gigcal_menu;
 break;

 case 'bandslist':
  if($gigconfig['menu_top']) echo $gigcal_menu;
  require_once('bandslist.php');
  if($gigconfig['menu_bottom']) echo "<br />" . $gigcal_menu;
 break;

Pulling data and displaying the paginated results fall to venueslist.php and bandslist.php; Thanks to rontec76 at joomla.com Joomla Forums for his well-documented efforts. The code for displaying the bands and venues was pulled from banddetails.php and venuedetails.php.

My code is in an attached .zip file. I can also post them as .gz if people want it.

As for display tweaks, I modified mod_gigcal_upcom.php to output the results as a table instead of a list- most of the other modules I use output tables. I also modified cal.php; I wanted the Calendar Cells for Event Days to have background colors, so I edited the if statements at line 212.

Please feel free to comment/critique - If you know how to make the code more efficient, faster, or otherwise better- have at it.
« Last Edit: March 23, 2007, 10:41:48 PM by Capt. gigCal » Logged

ultrasciencelabs.com
ultra-artstudios.com

spam-a-doodle-doo Wakeup!! Wakeup!! It is time to occur. The good day is waiting for you. You are the author of your own life story. - engrish.com
Capt. gigCal
Administrator
Sr. Member
*****
Posts: 495


View Profile
« Reply #1 on: January 05, 2006, 01:40:56 PM »

Interesting. Can you show an example of this pagination or is in your backend admin? Screenshots, anything would be appreciated.
Logged

Capt. gigCalendar
Nobody plays more gigCalendar
Brian Johnson
Jr. Member
**
Posts: 10



View Profile
« Reply #2 on: January 12, 2006, 08:23:01 AM »

The pagination is totally in the frontend.

Here's the code for bandslist.php - displays band details alphabetically for all the published bands in the database.

Code:
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
global $mosConfig_list_limit;

// Begin session to track variables used in search
    session_start();
   
    // grab values from form submission or session
    if (isset($_REQUEST['Type'])){
      $_SESSION['Type'] = $_REQUEST['Type'];
      $Type = $_SESSION['Type'];
    }
    else {
      $Type = $_SESSION['Type'];
    }
   
//$limit = intval( mosGetParam( $_REQUEST, 'limit', 10 ) );
//$limitstart = intval( mosGetParam( $_REQUEST, 'limitstart', 0 ) );
if (!isset($_REQUEST['limit']))
$limit = $mosConfig_list_limit;
else
$limit = $_REQUEST['limit'];
if (!isset($_REQUEST['limitstart']))
$limitstart = 0;
else
$limitstart = $_REQUEST['limitstart'];


// count some rows
$sqlb = "select * from " . $mosConfig_dbprefix . "gigcal_bands where published='1'";
if ($get_resultsb = mysql_query($sqlb)) {
$num_resultsb = mysql_num_rows($get_resultsb); }

 
// include pagination support files
include_once( "includes/pageNavigation.php" );
// create page nav object
$pageNav = new mosPageNav($num_resultsb, $limitstart, $limit);
 
// form query with limits, do a data fetch, then run an output loop
$sqlb = "select * from " . $mosConfig_dbprefix . "gigcal_bands where published = '1' ORDER BY bandname LIMIT " . $pageNav->limitstart . ", " . $pageNav->limit . "";
if ($get_resultsb = mysql_query($sqlb)) {
while ($resultb = mysql_fetch_assoc($get_resultsb)) {
?>

<?php $contents $gigconfig['details_band'];

$contents str_replace("<\\$bandname\\$>"$resultb['bandname'], $contents);
$contents str_replace("<\\$website\\$>"$resultb['website'], $contents);
$contents str_replace("<\\$contactname\\$>"$resultb['contactname'], $contents);
$contents str_replace("<\\$contactemail\\$>"$resultb['contactemail'], $contents);
$contents str_replace("<\\$contactphone\\$>"$resultb['contactphone'], $contents);
$contents str_replace("<\\$city\\$>"$resultb['city'], $contents);
$contents str_replace("<\\$state\\$>"$resultb['state'], $contents);
$contents str_replace("<\\$notes\\$>"$resultb['notes'], $contents);


echo 
$contents;
}}


    
// create the link used with pageNav code below
  
$link "index.php?option=com_gigcal&amp;task=bandslist";
  
  
// Create results table and header row
?>

    <input type="hidden" name="option" value="<?php echo $option?>">
    <input type="hidden" name="task" value="">
  <table width="100%">
  <tr>
    <tr>
      <td align="center" colspan="7"> <?php echo $pageNav->writePagesCounter(); ?> </td>
    </tr>
    <tr>
      <td align="center" colspan="7"> <?php echo $pageNav->writePagesLinks($link); ?> </td>
    </tr>
    <tr>
      <td align="center" colspan="7"> <?php echo $pageNav->writeLimitBox($link); ?> </td>
    </tr>
</tr>
</table>
<?php
?>


The pagination uses sessions to keep track of the user's preferred "list_limit".

You can see the code in action here.
« Last Edit: March 23, 2007, 10:44:41 PM by Capt. gigCal » Logged

ultrasciencelabs.com
ultra-artstudios.com

spam-a-doodle-doo Wakeup!! Wakeup!! It is time to occur. The good day is waiting for you. You are the author of your own life story. - engrish.com
Capt. gigCal
Administrator
Sr. Member
*****
Posts: 495


View Profile
« Reply #3 on: January 12, 2006, 10:11:48 AM »

bruce42 - thanks for submitting your modifications. We will review them shortly.
Logged

Capt. gigCalendar
Nobody plays more gigCalendar
Scott
Jr. Member
**
Posts: 8


View Profile
« Reply #4 on: January 20, 2006, 10:32:09 PM »

I know this is a bit quick, but any results or hints on this?

Smiley
Logged
Capt. gigCal
Administrator
Sr. Member
*****
Posts: 495


View Profile
« Reply #5 on: January 21, 2006, 01:30:46 AM »

loki wrote:
Quote
I know this is a bit quick, but any results or hints on this?

I don\'t understand. What are you asking here? I guess if you\'re interested in these modifications you should backup the original file and try the changes posted here. Let us know your results or give some more info...
Logged

Capt. gigCalendar
Nobody plays more gigCalendar
Brian Johnson
Jr. Member
**
Posts: 10



View Profile
« Reply #6 on: January 27, 2006, 09:28:04 PM »

All righty.

Been playing with the mods I made, adding a CSS field to gigCalendar -> Gig Config -> Details Pages in the back end. The CSS adds the "gigcal_rowLabel" and "gig_rowContent" classes that give the user more control over the text and layout formatting of the Gig Details page and Band and Venue list pages I made. In conjuction with the existing "sectiontableentry1" and "sectiontableentry2" styles in the template_css.css file of every Joomla/Mambo template, you have complete CSS control the details and lists pages.

Other features I've been working on include multiple band selection for a given gig, and a Gig Title field (that one was easy)

The Select Multiple Bands feature is coming along- right now it is a matter of display - the actual selection of multiple bands works in the admin interface and are displayed in the frontend Gig Details page. I have it half working in the full calendar view.

As usual, you can check out my testbench at http://test.ultrasciencelabs.com/joomla/
« Last Edit: March 23, 2007, 10:45:54 PM by Capt. gigCal » Logged

ultrasciencelabs.com
ultra-artstudios.com

spam-a-doodle-doo Wakeup!! Wakeup!! It is time to occur. The good day is waiting for you. You are the author of your own life story. - engrish.com
Capt. gigCal
Administrator
Sr. Member
*****
Posts: 495


View Profile
« Reply #7 on: January 27, 2006, 10:14:39 PM »

This sounds great, bruce42! Couldn\'t find any gigs that had multiple bands or a gig title at your test site but these are popular requests.
Logged

Capt. gigCalendar
Nobody plays more gigCalendar
Brian Johnson
Jr. Member
**
Posts: 10



View Profile
« Reply #8 on: January 28, 2006, 08:20:27 AM »

Try this.

It\'s a February date so it\'s kind of buried.

When you link to an event from the MiniCal module, the details page is farked, but the page looks fine when you  click on a link in the upcoming events module.

The Jan 28th gig has two bands and a title now, too.

** UPDATE **
The list and alist pages now show multiple bands with working rollovers. Also, I implemented session tracked pagination- your preferred view is passed between list.php, alsit.php, bandslist.php, and venueslist.php

I have a little more work to do with the upcoming and minical modules, and some of the admin pages, but so far so good.

Post edited by: bruce42, at: 2006/01/28 15:57
Logged

ultrasciencelabs.com
ultra-artstudios.com

spam-a-doodle-doo Wakeup!! Wakeup!! It is time to occur. The good day is waiting for you. You are the author of your own life story. - engrish.com
Capt. gigCal
Administrator
Sr. Member
*****
Posts: 495


View Profile
« Reply #9 on: January 30, 2006, 01:22:36 AM »

Working very well - nice job!

Are you be interested in refactoring the output of these pages? I\'m sure that you\'ve found redundant code in these pages since you\'re editing the overlib output. Any thoughts on how we could move this code to a single library to help make future modifications easier?
Logged

Capt. gigCalendar
Nobody plays more gigCalendar
Brian Johnson
Jr. Member
**
Posts: 10



View Profile
« Reply #10 on: January 30, 2006, 11:08:07 AM »

It shouldn\'t be too difficult, and as long as I\'m hacking into the display stuff, yeah I think I could try my hand at building such a library.
Logged

ultrasciencelabs.com
ultra-artstudios.com

spam-a-doodle-doo Wakeup!! Wakeup!! It is time to occur. The good day is waiting for you. You are the author of your own life story. - engrish.com
Brian Johnson
Jr. Member
**
Posts: 10



View Profile
« Reply #11 on: February 02, 2006, 01:22:15 PM »

Been browsing throught the various wishlists and suggestions, and decided to add a \"Create gigSeries\" feature. It\'s kind of like recurring events, but instead  of creating a single event that displays on multiple dates, it creates a series of unique events on interval you specify.

Right now you can set a series interval of every one, two, or three weeks, or an event on the first, second, third or fourth appearance of a day every month (i.e. first Mondays, or third Saturdays). You can create dates 3, 6, 9 or 12 months into the future.

That part is working, ; the next step is to implement a mass delete feature. Choose a gig from your series, check the \"Delete Series After This Date\" checkbox, and the system will delete your selected gig and all gigs in the series after it.

As for multi-day events- haven\'t started on that one yet.
Logged

ultrasciencelabs.com
ultra-artstudios.com

spam-a-doodle-doo Wakeup!! Wakeup!! It is time to occur. The good day is waiting for you. You are the author of your own life story. - engrish.com
Scott
Jr. Member
**
Posts: 8


View Profile
« Reply #12 on: February 03, 2006, 12:52:19 PM »

Great work!

For a complete PHP idiot like me, is the file you link in the first post the current version of your work? Also, how does one go about adding this hack to an existing install?

Sorry if these are really basic questions - pointers to tutorials would be welcome in lieu of actual instructions (I know that can be a pain).

Thanks!
Logged
Brian Johnson
Jr. Member
**
Posts: 10



View Profile
« Reply #13 on: February 03, 2006, 10:46:17 PM »

The files in the first post is NOT current version. I believe it just added band and venue lists with pagination. If you are willing to go so far as to try this stuff out, just replace the existing files (via FTP) in your com_gigcal directory with the files I attached. Just be sure to hang on to the original install files so you can return things to normal if need be.

I make no guarantees here, but I\'ve been pretty happy with the results so far, and my gigCal install hasn\'t blown up.

Post edited by: bruce42, at: 2006/02/03 23:47
Logged

ultrasciencelabs.com
ultra-artstudios.com

spam-a-doodle-doo Wakeup!! Wakeup!! It is time to occur. The good day is waiting for you. You are the author of your own life story. - engrish.com
Scott
Jr. Member
**
Posts: 8


View Profile
« Reply #14 on: February 04, 2006, 12:29:58 AM »

Since there are no files attached to your most recent post, I presume you are referring to the original post to grab files from?

And just to be clear, I should save the current gigCal install files from the Component folder, then FTP your modified version in its place. Is that correct?

If I can get this to work, I\'ll be very, very happy! Smiley
Logged
Pages: [1] 2 Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!

Login Form

Welcome, Guest. Please login or register.
May 25, 2013, 10:42:00 AM
Username: Password:
Login with username, password and session length

Forgot your password?
Basecamp project management and collaboration