Home arrow Forum arrow gigCalendar 1.x Forum arrow gigCalendar 1.0 arrow gigCalendar in Content Items and Modules
gigCalendar in Content Items and Modules
Welcome, Guest. Please login or register.
June 20, 2013, 03:51:44 AM
Home Help Search Login Register

+  gigCalendar Forums
|-+  gigCalendar 1.x Forum
| |-+  gigCalendar 1.0
| | |-+  gigCalendar in Content Items and Modules
« previous next »
Pages: [1] Print
Author Topic: gigCalendar in Content Items and Modules  (Read 8982 times)
Capt. gigCal
Administrator
Sr. Member
*****
Posts: 495


View Profile
« on: March 23, 2007, 04:31:10 PM »

Importing a list of a individual band's gigs into a content item is already possible using gigCalendar's RSS feeds, standard Joomla modules and by inserting the module position into the content item.

Steps to display a single band's gigs in a Joomla content item:

1) Go to your gigCalendar RSS page
2) copy the RSS feed that is listed there for the band you want

Continue with the Simple Step-By-Step Guide to adding an RSS feed to your Joomla site:
http://forum.joomla.org/index.php?topic=15016.msg190534#msg190534
Logged

Capt. gigCalendar
Nobody plays more gigCalendar
pedantics
Jr. Member
**
Posts: 11


View Profile
« Reply #1 on: August 09, 2007, 08:06:50 PM »

using a modified version of the rss file, here's a workaround to add a list of upcoming gigs for the individual band/venue details pages or on any other page of your site (until the feature is properly (hopefully) implemented in the module).

I don't claim to be a programmer, so there's probably a better and simpler way to do this... but this works! I'm putting it up here in hope this is of some use to somebody else.

modified version of rss.php - save as showlister.php
Code:
<?php
require_once("../../configuration.php");

$database_connect mysql_connect($mosConfig_host$mosConfig_user$mosConfig_password);
mysql_select_db($mosConfig_db$database_connect);
$now time();

//item id ghetto workaround
$sqli "select id, link from " $mosConfig_dbprefix "menu where link like '%com_gigcal%' LIMIT 1";
$get_resulti mysql_query($sqli);
while (
$resulti mysql_fetch_assoc($get_resulti)) {
$itemidfix '&amp;Itemid=' $resulti['id'];
}
//--------------
?>


<table border="0" cellspacing="0" cellpadding="2" width="100%" class="sectiontableentry1">

<?php

if(($_GET['search'] != "") || ($_GET['venue_id'] != "") || ($_GET['band_id'] != ""))
 {

 
$band_id mysql_real_escape_string($_GET['band_id']);
 
$venue_id mysql_real_escape_string($_GET['venue_id']);


 
$filters " and ";
 if(
$_GET['venue_id'] != ""$filters .= "gigcal_venues_id = '$venue_id'";
 if((
$_GET['venue_id'] != "") && ($_GET['bandfilter_id'] != "")) $filters .= " and ";
 if(
$_GET['band_id'] != ""$filters .= "gigcal_bands_id = '$band_id'";
// if($_GET['search'] != "")
//  {
// if($filters != " where ") $filters .= " and ";
//   //$filters .= " MATCH(searchfields) AGAINST ('{$_GET['gigmanagersearch']}')";
//   $filters .= " searchfields like '%{$search}%'";

//  }
 
}


$sql "select * from " $mosConfig_dbprefix "gigcal_gigs where published = '1' and access <= '0' and gigdate > '$now' $filters order by gigdate";
//echo $sql;
if ($get_results mysql_query($sql)) {
$num_results mysql_num_rows($get_results); }
if (
$num_results 0) {
while (
$result mysql_fetch_assoc($get_results)) {

$sqlv "select * from " $mosConfig_dbprefix "gigcal_venues where gigcal_venues_id = '{$result['gigcal_venues_id']}'";
$resultv mysql_fetch_assoc(mysql_query($sqlv));

$sqlb "select * from " $mosConfig_dbprefix "gigcal_bands where gigcal_bands_id = '{$result['gigcal_bands_id']}'";
$resultb mysql_fetch_assoc(mysql_query($sqlb));

$resultb['bandname'] = str_replace("<br />"""$resultb['bandname']);
$resultb['bandname'] = str_replace("&""&amp;"$resultb['bandname']);
$resultb['bandname'] = str_replace("<br />"""$resultb['bandname']);

$resultv['venuename'] = str_replace("<br />"""$resultv['venuename']);
$resultv['venuename'] = str_replace("&""&amp;"$resultv['venuename']);
$resultv['venuename'] = str_replace("<br />"""$resultv['venuename']);

?>


<tr>
 <td><?php echo date("d M, Y (D)"$result['gigdate']); ?></td>
 <td><?php echo $resultb["bandname"] ; ?></td>
 <td><?php echo $resultv['venuename'] ; ?></td>
</tr>

<?php }} ?>

</table>

</body>
</html>


for my purposes, the listings don't need to link to each gig's details page - but it'd be easy enough to link to:
Code:
<?php echo $mosConfig_live_site "?option=com_gigcal&amp;task=details&amp;gigcal_gigs_id="$result['gigcal_gigs_id'] . $itemidfix?>



to display upcoming gigs for each band on their details page, at the bottom of banddetails.php add
Code:
<br>
<table width="85%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td class="sectiontableheader"><strong>Upcoming gigs</strong></td></tr>
<tr><td><?php include ("http://(pathtoyourjoomlainstall)/components/com_gigcal/showlister.php?band_id=".$resultb['gigcal_bands_id']); ?></td></tr>
</table>

and to to do the same for venues, add to the end of venuedetails.php
Code:
<br>
<table width="85%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td class="sectiontableheader"><strong>Upcoming gigs</strong></td></tr>
<tr><td><?php include ("http://(pathtoyourjoomlainstall)/components/com_gigcal/showlister.php?venue_id=".$resultv['gigcal_venues_id']); ?></td></tr>
</table>

and for any other page (displays all upcoming shows)
Code:
<table width="85%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td class="sectiontableheader"><strong>Upcoming gigs</strong></td></tr>
<tr><td><?php include ("http://(pathtoyourjoomlainstall)/components/com_gigcal/showlister.php"); ?></td></tr>
</table>
« Last Edit: August 09, 2007, 11:30:52 PM by pedantics » Logged
smoozz
Sr. Member
****
Posts: 43

It's not how much u know but what you do with it


View Profile WWW
« Reply #2 on: March 12, 2008, 04:56:24 PM »

for my purposes, the listings don't need to link to each gig's details page - but it'd be easy enough to link to:
Code:
<?php echo $mosConfig_live_site "?option=com_gigcal&amp;task=details&amp;gigcal_gigs_id="$result['gigcal_gigs_id'] . $itemidfix?>

Where do I put this for linking?

Greetz,
smoozz
Logged
pedantics
Jr. Member
**
Posts: 11


View Profile
« Reply #3 on: March 25, 2008, 12:48:04 AM »

in your showlister file

add the link to either

<?php echo date("d M, Y (D)", $result['gigdate']); ?>
<?php echo $resultb["bandname"] ; ?>
<?php echo $resultv['venuename'] ; ?>

or all 3

Logged
smoozz
Sr. Member
****
Posts: 43

It's not how much u know but what you do with it


View Profile WWW
« Reply #4 on: March 26, 2008, 07:30:55 AM »

Hi,

I'm very sorry but my knowledge doesn't reach that far regarding the link. I tried a few things but it didn't gave the right result.
Can you give me an example how the code would look like with just the link to the gigdate?

With kind regards,
smoozz
Logged
Capt. gigCal
Administrator
Sr. Member
*****
Posts: 495


View Profile
« Reply #5 on: March 26, 2008, 11:29:25 PM »

You can attach .php files by renaming them to .txt

Thanks!
Logged

Capt. gigCalendar
Nobody plays more gigCalendar
smoozz
Sr. Member
****
Posts: 43

It's not how much u know but what you do with it


View Profile WWW
« Reply #6 on: April 02, 2008, 06:10:44 AM »

You can attach .php files by renaming them to .txt

Thanks!

I'm not following here...I want the upcoming gigs to have a link to the gigdetails page...but I don't know how to add the link actually....can I have an example code to do this please?
Logged
Capt. gigCal
Administrator
Sr. Member
*****
Posts: 495


View Profile
« Reply #7 on: April 04, 2008, 10:19:42 AM »

I was asking Pedantics to consider posting the complete code as a .txt file so that we could try it out. This has worked well with other changes suggested on the forum.
Logged

Capt. gigCalendar
Nobody plays more gigCalendar
astropos
Newbie
*
Posts: 1



View Profile WWW
« Reply #8 on: June 27, 2010, 08:11:16 AM »

You can attach .php files by renaming them to .txt

Thanks!

Many Thanks!
Logged

lanibelle
Newbie
*
Posts: 1


View Profile WWW
« Reply #9 on: July 24, 2010, 11:46:17 PM »

Me, also facing the same problem. I want the upcoming gigs to have a link to the gigdetails page. But I don't know how to add the link. If you found the solution, plzzzz let me know.  huh
Logged

halelawya
Newbie
*
Posts: 3


I LOVE YOU!


View Profile WWW
« Reply #10 on: July 29, 2010, 04:30:59 PM »

for my purposes, the listings don't need to link to each gig's details page - but it'd be easy enough to link to:
Code:
<?php echo $mosConfig_live_site "?option=com_gigcal&amp;task=details&amp;gigcal_gigs_id="$result['gigcal_gigs_id'] . $itemidfix?>

Where do I put this for linking?

Greetz,
smoozz


Yeah where to put this? help pls!
Logged

roxane
Newbie
*
Posts: 1


View Profile
« Reply #11 on: August 28, 2010, 02:09:22 AM »

Importing a list of a individual band's gigs into a content item is already possible using gigCalendar's RSS feeds, standard Joomla modules and by inserting the module position into the content item.

Steps to display a single band's gigs in a Joomla content item:

1) Go to your gigCalendar RSS page
2) copy the RSS feed that is listed there for the band you want

Continue with the Simple Step-By-Step Guide to adding an RSS feed to your Joomla site:
http://forum.joomla.org/index.php?topic=15016.msg190534#msg190534

I've tried to use that code below and its working fine.
Danville CA Wills
Logged
Pages: [1] 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.
June 20, 2013, 03:51:44 AM
Username: Password:
Login with username, password and session length

Forgot your password?
Basecamp project management and collaboration