Author Topic: need to show a slide show onli in da home page  (Read 448 times)

0 Members and 1 Guest are viewing this topic.

Offline jaz529Topic starter

  • Irregular
    • View Profile
Re: need to show a slide show onli in da home page
« Reply #15 on: February 03, 2010, 11:43:01 AM »
as there is only one home page and rest of the modules are called in the same page

which means when we click on content link content is shown on the same page and when clicked on about page it is also showed in this homepage..so this slide show is shown in about page and other pages...

Offline aeroswat

  • Devotee
    • View Profile
Re: need to show a slide show onli in da home page
« Reply #16 on: February 03, 2010, 11:50:32 AM »
as there is only one home page and rest of the modules are called in the same page

which means when we click on content link content is shown on the same page and when clicked on about page it is also showed in this homepage..so this slide show is shown in about page and other pages...


Ok. I think i understand now. You use one page that is dynamically changed depending on where you are in the site. I'm not sure if you can do what you want to do. You can do an if that wraps around that include and check to see if they are accessing the main page. If they are then don't do the include and if they aren't then do the include.

Offline gwolgamott

  • Enthusiast
  • Gender: Male
  • Yes I am wrong at times... that is the difference.
    • View Profile
Re: need to show a slide show onli in da home page
« Reply #17 on: February 03, 2010, 12:41:29 PM »
Yeah... so we have a page that creates the site.
We have a page (modules) that change part of the page only when clicking on link.
-creating the about page... other pages.
as there is only one home page and rest of the modules are called in the same page

which means when we click on content link content is shown on the same page and when clicked on about page it is also showed in this homepage..so this slide show is shown in about page and other pages...


correct?

This is what you want to do... instead of it displaying a default code when its at the home part....
create a home module. Just like the about one. etc....
Then when page starts it automatically calls that module. Sounds like you don't have a seperate module for home. Need to develope that and then your problem will be fixed. Because you slide show will be in that module and not the default section that is used to display all the other pages too.
I sit in the seat of Gods In the midst of the seas.

Offline jaz529Topic starter

  • Irregular
    • View Profile
Re: need to show a slide show onli in da home page
« Reply #18 on: February 06, 2010, 03:05:09 PM »
this is the content.module which calls all the pages so what should i change and a make slideshow.module whi calls slide show.


<?php
global $rootpath,$sitepath;
$site_template = getSetting("sitetemplate",$db);
$filepath = $rootpath.'templates/'.$site_template.'/'.$c_file;
if (file_exists($filepath) || isset($c_content)) {
   if(isset($c_content)){
      $c_content='?'.'>'.trim($c_content).'<'.'?';
      eval($c_content);
   }else{
      include($filepath);
      
   }

}
?>

[/color]


THIS IS  WHAT IS THERE IN CONTENT.INC WHICH IS CALLED BY CONTENT.MODULE.

$accountManagementPage=false;
    if (($_GET['id']=='56')&&(getSetting("accountpageon",$db)==0))
    {
      $_GET['id']='1';
    }
   if($_GET['id'] >= 200){
      $db->query("SELECT * FROM content WHERE linkid = ".quote_smart($_GET['id']));
      $res = $db->fetch();
      $c_content = $res['page'];
      $c_header = $res['title'];
      $c_file = "";
   }else{         
      switch($_GET['id']) {
         //Accessible to all
         case '1': $c_file = 'modules/latest.module'; $c_header = 'Home'; break;
         case '2': $c_file = 'modules/toprated.module'; $c_header = 'Top Rated <strong>Media</strong>'; break;
         case '3': $c_file = 'modules/mostviewed.module'; $c_header = 'Most Viewed <strong>Media</strong>'; break;
         case '4': $c_file = 'modules/forgot.module'; $c_header = 'Forgotten Login'; break;
         case '5': $c_file = 'modules/upload.module'; $c_header = 'Upload Media'; break;
         case '6': $c_file = 'modules/register.module'; $c_header = 'Register'; break;
         case '8': $c_file = 'modules/play.module'; $c_header = dec_VID; break;
         case '10': $c_file = 'modules/activate.module'; $c_header = 'Activate Your Account'; break;
         case '11': $c_file = 'modules/tellafriend.module'; $c_header = 'Tell a Friend'; break;
         case '88': $c_file = 'modules/members.module'; $c_header = 'Members'; break;
         case '16': $c_file = 'modules/terms.module'; $c_header = 'Terms of Service'; break;
         case '18': $c_file = 'modules/profile.module'; $c_header = 'Profile'; break;
         case '19': $c_file = 'modules/groups.module'; $c_header = 'Groups'; break;
         case '20': $c_file = 'modules/showgroup.module'; $c_header = 'View Group'; break;
         case '21': $c_file = 'modules/category.module'; $c_header = 'Category'; break;
         case '22': $c_file = 'modules/mediasearch.module'; $c_header = 'Search'; break;
         case '23': $c_file = 'modules/showimage.module'; $c_header = 'Display Image'; break;
         case '24': $c_file = 'modules/alltags.module'; $c_header = 'Tags'; break;
         case '25': $c_file = 'modules/add.module'; $c_header = 'Add'; break;
         case '26': $c_file = 'modules/out.module'; $c_header = 'Out'; break;
         case '27': $c_file = 'modules/showallfriends.module'; $c_header = 'All My Friends'; break;
         case '28': $c_file = 'modules/domedia.module'; $c_header = 'Change Media Ad'; break;
         case '29': $c_file = 'modules/rss.module'; $c_header = 'Rss Feeds'; break;
         case '30': $c_file = 'modules/news.module'; $c_header = 'Sites News'; break;
         case '31': $c_file = 'modules/edit.module'; $c_header = 'Edit My Media'; break;
         //User only pages
         case '55': $c_file = 'modules/usercp.module'; $c_header = 'Control Panel'; break;
         case '56': $c_file = 'modules/account.module'; $c_header = 'Account Management'; $accountManagementPage=true; break;
         //Admin only pages
         case '100': $c_file = 'modules/admin/index.module'; $c_header = 'Administration'; break;
         case '101': $c_file = 'modules/admin/add_cat.module'; $c_header = 'Add Category'; break;
         case '102': $c_file = 'modules/admin/show_cats.module'; $c_header = 'Category Overview'; break;
         case '103': $c_file = 'modules/admin/show_media.module'; $c_header = 'Media Overview'; break;
         case '104': $c_file = 'modules/admin/new_uploads.module'; $c_header = 'New Uploads'; break;
         case '105': $c_file = 'modules/admin/users.module'; $c_header = 'Registered Users'; break;
         case '106': $c_file = 'modules/admin/settings.module'; $c_header = 'Settings'; break;
         case '107': $c_file = 'modules/admin/play.module'; $c_header = 'Preview Media'; break;
         case '108': $c_file = 'modules/admin/contentmanager.module'; $c_header = 'Content Management'; break;
         case '109': $c_file = 'modules/admin/menumanager.module'; $c_header = 'Menu Management'; break;
         case '111': $c_file = 'modules/admin/emailmanager.module'; $c_header = 'Email Management'; break;
         case '112': $c_file = 'modules/admin/import.module'; $c_header = 'Import Media'; break;
         case '113': $c_file = 'modules/admin/badwords.module'; $c_header = 'Bad Words'; break;
         case '114': $c_file = 'modules/admin/massemail.module'; $c_header = 'Mass Email'; break;
         case '115': $c_file = 'modules/preview.module'; $c_header = 'Preview Page'; break;
         case '116': $c_file = 'modules/admin/mediasetting.module'; $c_header = 'Media Settings'; break;
         case '117': $c_file = 'modules/admin/videoads.module'; $c_header = 'Manage Video Ads'; break;
         case '118': $c_file = 'modules/admin/adblocks.module'; $c_header = 'Manage Site Ads'; break;
         case '150': $c_file = 'modules/admin/extras.module'; $c_header = 'Manage Extras and Mods'; break;
         case '119': $c_file = 'modules/admin/traffic.module'; $c_header = 'Manage Traffic Exchange'; break;
         case '121': $c_file = 'modules/admin/rewards.module'; $c_header = 'Manage Reward System'; break;
         case '122': $c_file = 'modules/admin/ignore.module'; $c_header = 'Ajax Functions for Rewards'; break;
         case '123': $c_file = 'modules/admin/stats.module'; $c_header = 'Admin Stats'; break;
         default: $c_file = 'modules/error.php'; $c_header = 'Error 404'; break;
      }
   }
?>


SO COULD YOU PLEASE TELL ME WHAT SHOULD I CHANGE IN THE PROGRAMMING CODE FOR MAKING A SLIDESHOW.MODULE AND SLIDESHOW.IC WHICH CALLS THE SLIDESHOW

Offline gwolgamott

  • Enthusiast
  • Gender: Male
  • Yes I am wrong at times... that is the difference.
    • View Profile
Re: need to show a slide show onli in da home page
« Reply #19 on: February 09, 2010, 07:47:57 AM »
 case '1': $c_file = 'modules/latest.module'; $c_header = 'Home'; break;

if that is a module for a home page... maybe. It kinda looks like it may. I'd put the code for the slideshow within that module. That way only displayed on the home page.  I'm of course assuming that is a module for part of the home page.
I sit in the seat of Gods In the midst of the seas.

PHP Freaks Forums

« on: »

Tired of these ads? Purchase a supporter subscription to get rid of them.