Jump to content

Recommended Posts

Posted

Is there a way to edit what the tour page looks like on the site?! I mean the layout of the different tours on the page. It seems it is always just one row, then another, then another. Whereas, rows and columns might be nice. Just wondering.

Posted

So, I guess where I am stuck is.....I have the Tour page where I want to put the tours side by side in two columns, all they way down. So, like 12 tours in 2 columns, 6 rows. I just can't figure out where/how to put the Div. Here is the current code in progress:

<?php
if(Auth::LoggedIn() == false)
{
  echo 'Please login to view this page.';
  echo '<br /><br /><br />';
  Template::Show('login_form.tpl');
  return;
}
?>

<?php

//////////////////////////////////////////////////////////////////////

//simpilotgroup Tour 1.0 module for phpVMS virtual airline system   //

//@author David Clark (simpilot)								    //

//@copyright Copyright (c) 2011, David Clark, All Rights Reserved   //

//////////////////////////////////////////////////////////////////////

echo '<center><h6>'.SITE_NAME.' Tours</h6></center>';

if($tours)

{

echo '<table width="40%" border="1px" align="center">';

foreach($tours as $tour)

{

   if($tour->active == '0'){continue;}

   $flights = unserialize($tour->flights);

   echo '<tr>';

   echo '<td width="25%">';

   echo '<center><h2>'.$tour->title.'</h2></center>';

   echo '<b>Status:</b> ';

   if($tour->active == '1'){echo '<font color="#00FF00"><b> Active</b></font>';}

   if($tour->active == '2'){echo '<font color="#FF0000"><b> Complete</b></font>';}

   if($tour->active == '3'){echo '<font color="#FF0000"><b> Upcoming</b></font>';}

   echo '<br /><b>Description:</b> '.$tour->description.'<br />';

   echo '<b>Participants:</b> '.TourData::participants($tour->id).'<br />';

   echo '<br /><a href="'.url('tour/details').'/'.$tour->id.'" text-decoration:underline;"><b>View Details</b></a>';

   // echo '</td><td>';

   if($tour->image == '')

   {echo 'No Image Available';}

   else

   {echo '<center><img src="'.$tour->image.'" alt="'.$tour->title.'" style="max-width:300px;" /></center>';}

   echo '</td>';

   echo '<td>';

   echo '<b>Flights:</b><br />';

   $i = 1;

   foreach($flights as $flight)

   {

    $schedule = SchedulesData::getSchedule($flight);

    echo 'Leg: '.$i.' - '.$schedule->code . $schedule->flightnum.' - '.$schedule->depicao.' to '.$schedule->arricao.'<br />';

    $i++;

   }

   echo '</td>';

   echo '</tr>';

}

echo '</table>';

}

else

{echo 'No Tours Have Been Created.';}

?>

Posted

Yeah, sorry for taking so long to get back to you. The template, I think, was the original one that I had just modied along the way; but it has been so long, I forgot :(

But basically, the way it looks right now, with the changes I made above....is a smaller width table which I wanted to split into 2 columns essentially.

The tour module automatically puts it into a table, no?!

  • Administrators
Posted

Yes, the template is set to structure as a table. The loop is going to have to be modified to count and allow two listings in each row instead of one.

  • Administrators
Posted

Can I do that?! Or does the module have to be modified?!

This will have to be set in the template, the module just gives an array of the data from the database.

Maybe something like this could be used as a base;

$columns = 1;
foreach($lines as $line)    {
   //check to see if we are on the first column of the row
   if($columns == 1){echo '<tr>';}
   echo '<td>'.mydata.'</td>';
   //check and see if we are on the second column
   //if we are - end the row and reset the column count
   //if not - add to the column count
   if($columns == 2){echo '</tr>'; $columns = 1;}
   else
   {$columns++;}
}
//check if we have an open row
if($columns == 2){echo '</tr>';}

  • 1 year later...
Posted

Sorry, but I am coming back to this because I could never figure it out.  I can edit it with "inspect" mode, but I have no idea what file I need to edit.  I mean I would have thought the "tour_index.tpl" could be the item to edit, but apparently not.

I am just confused on this one, sorry :(  Any help would be appreciated.

Bruce

Posted
2 hours ago, CPC900 said:

Sorry, but I am coming back to this because I could never figure it out.  I can edit it with "inspect" mode, but I have no idea what file I need to edit.  I mean I would have thought the "tour_index.tpl" could be the item to edit, but apparently not.

I am just confused on this one, sorry :(  Any help would be appreciated.

Bruce

I been editing mine, what are you trying to edit. I will try to help you.

Posted (edited)

I just want to have the tours appear 2 or 3 across, instead of just one column.  Like I said, I can work on it in firefox or chrome with the inspect function to see what it could look like, but have no clue how to edit the tour_index.tpl to make that happen??!

So, default looks like:

tour_edit1.jpg

but want this:

tour_edit2.jpg

Bruce

 

Edited by CPC900
  • 2 weeks later...
Posted

So, everyone who runs the tour mod, all have it displaying in ONE row?!  Nobody has a different look to their tour page?!

And, is there another Tour type module out there for PMPVMS?!

Bruce

Posted (edited)

Ok, I will look into that tonight.  I assume, Bootstrap is not TOO hard to install into my site, without causing too much mental anguish ;)

And what did you recommend to install in with: npm, yarn, composer or nuget??

Thanks,

Bruce

 

Edited by CPC900
  • 8 months later...
Posted

Hello

Shakamonkey88 is there any chance  to you give me the php code for your Tours Page please, mine looks horrible. I would love to do one that look like the picture above. 

I have the Tour Center module and the Ela Skin installed on my VA page

 

Thank You.

 

 

  • 1 month later...
Posted
On 12/18/2017 at 12:04 AM, shakamonkey88 said:

I have it showing in two colums - is this something you're after?

tE7aeTt.jpg

Do you have the code above for Crazy Creative's Tour Module.  The original is to plain.

 

  • 1 month later...
  • 11 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...