as stamps a top in the principal page as stamps a top in the principal page
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

as stamps a top in the principal page

Started by ale, June 18, 2004, 12:54:19 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ale

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

Joachim Müller

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

ale

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

Joachim Müller

Try including a php file with this content <?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

ale

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';?>)

Joachim Müller

you can not simply put echo include('http://www.mipage.com/h/otherpages/toplist.php');afterecho $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