Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: as stamps a top in the principal page  (Read 3615 times)

0 Members and 1 Guest are viewing this topic.

ale

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
as stamps a top in the principal page
« on: June 18, 2004, 12:54:19 am »

Hello I have to install a script of top ... and my doubt is wherefrom I have to include it for In order that it appears in the principal page. in the template.html, index.php, theme.php?

I have to call it a script top of this form:

1) <? Php include ("intercambios/in.php");?>

2) Include ("intercambios/toplist.php");?>

thank you for advance
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: as stamps a top in the principal page
« Reply #1 on: June 18, 2004, 01:27:01 pm »

php includes go into the theme.php
Please read both the documentation and the faq that come with coppermine, then do a search on the board and read the stickies. If this all fails, post your question.

GauGau
Logged

ale

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: as stamps a top in the principal page
« Reply #2 on: July 01, 2004, 11:09:43 am »

Hello I go two weeks and do not achieve that it me works well.

Is the well-read one the this post http: // coppermine.sourceforge.net/faq.php? Q=customHeader*customHeader, and I have followed the intrucciones.

theme.php

1) function pageheader($section, $meta = '')
{
   global $CONFIG, $THEME_DIR;
   global $template_header, $lang_charset, $lang_text_dir;
   if(empty($custom_header)){
         include('http://www.mipage.com/h/otherpages/in.php');
        $custom_header = ob_get_contents();
          ob_clean();
   }

   header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"');
   user_save_profile();

   $template_vars = array(
      '{LANG_DIR}' => $lang_text_dir,
      '{TITLE}' => $CONFIG['gallery_name'].' - '.$section,
      '{CHARSET}' => $CONFIG['charset'] == 'language file' ? $lang_charset : $CONFIG['charset'],
      '{META}' => $meta,
      '{GAL_NAME}' => $CONFIG['gallery_name'],
      '{GAL_DESCRIPTION}' => $CONFIG['gallery_description'],
      '{MAIN_MENU1}' => theme_main_menu1(),
      '{MAIN_MENU2}' => theme_main_menu2(),
      '{ADMIN_MENU}' => theme_admin_mode_menu(),
      '{CUSTOM_HEADER}' => $custom_header,
   );

   echo template_eval($template_header, $template_vars);
}


2) // Function for writing a pagefooter
function pagefooter()
{
   global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS;
   global $USER, $ALBUM_SET, $CONFIG, $time_start, $query_stats;
   global $template_footer;

   if ($CONFIG['debug_mode']) {
      $time_end = getmicrotime();
      $time = round($time_end - $time_start,3);

      $query_count = count($query_stats);
      $query_times = '';
      $total_query_time = 0;
      foreach ($query_stats as $qtime){
         $query_times .= round($qtime,3)."s ";
         $total_query_time += $qtime;
      }
      $total_query_time = round($total_query_time,3);

      starttable('100%', 'Debug info');
      echo "<tr><td class=\"tableb\">";
      echo "USER: <pre>";
      print_r($USER);
      echo "</pre></td></tr><td class=\"tableb\">";
      echo "GET :<pre>";
      print_r($HTTP_GET_VARS);
      echo "</pre></td></tr><td class=\"tableb\">";
      echo "POST :<pre>";
      print_r($HTTP_POST_VARS);
      echo "</pre></td></tr><td class=\"tableb\" align=\"center\">";
      echo <<<EOT
      Page generated in <b>$time</b> seconds - <b>$query_count</b> queries in <b>$total_query_time</b> seconds - Album set : $ALBUM_SET
EOT;
      echo "</td></tr>";
      endtable();
   }
   echo $template_footer;
   echo include('http://www.mipage.com/h/otherpages/toplist.php');
   
      }

template.html

3) insert in template.html the tag {CUSTOM_HEADER}

It shows me the top but the table of "randomize" and of " last uploads " it does it mas small and at the same time it shows me the following mistake:

Warning: pagefooter (): stream does not support seeking

Theme.php line 765, and in this line what I have is this include (' http:// www.mipage.com/h/otherpages/toplist.php '); "

The script that I want to install is this http://www.cjultra.com, in.php counts the visits, and toplist.php stamps the top.

I hope that they could help me am already desperate
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: as stamps a top in the principal page
« Reply #3 on: July 01, 2004, 01:09:03 pm »

Try including a php file with this content
Code: [Select]
<?php print 'Hello World'?>If this works fine, you integrated the include into coppermine correctly. If the include file you are actually trying to include displays errors, there's little we could do about it, since we can't support your custom php file you are going to include.
For details, search the forum for "custom script" and read all postings carefully.

GauGau
Logged

ale

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: as stamps a top in the principal page
« Reply #4 on: July 01, 2004, 01:52:24 pm »

Hellow gaugau ..I have done what you have said to me, it stamps "hello  world" but the same mistake continues going out for me .

Warning: pagefooter(): stream does not support seeking   ,

the mistake go out in the same line where I was calling before the toplist.php and where I call now the helloworld.php >>> (<? Php print 'Hello World';?>)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: as stamps a top in the principal page
« Reply #5 on: July 01, 2004, 03:12:23 pm »

you can not simply put
Code: [Select]
echo include('http://www.mipage.com/h/otherpages/toplist.php');after
Code: [Select]
echo $template_footer;, that's it. Your code is just wishfull thinking. If you need an include in the page footer as well, you have to modify theme.php accordingly - if you can't do that, you're probably out of luck.

GauGau
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.