Forum e-Weblink
System wymiany linków reklamowych - Crosslinking => Pomoc => Wątek zaczęty przez: effektive w Marzec 13, 2009, 17:40:39
-
Witam ktoś mi powie jak mam z includować plik index.php żeby mi go potem w szablonie czytało :( ??
Jak wstawiałem statystyki radia to robiłem coś takiego :
Pod:
"FILE_EXTENSIONS" => $file_extensions,
Dopisywałem:
"MOJE_INCLUDE" => file_get_contents("http://www.strona.pl/staty2.php"),
A następnie w szablonie <# MOJE_INCLUDE #>
Ale jak tak zrobie to z tym systemem linków to pokazuje mi kod ten co jest w tym pliku do którego dałem ścieżke .
Bardzo proszę o pomoc ;(
Odrazu mówie że to nie smart !! tylko Mihalism Multi host.
<?php
require_once "./source/includes/data.php";
if ($mmhclass->funcs->is_null($mmhclass->input->get_vars['module']) == false && is_file("{$mmhclass->info->root_path}source/modules/".basename($mmhclass->input->get_vars['module']).".php") == true) {
$module_name = basename($mmhclass->input->get_vars['module']);
require_once "{$mmhclass->info->root_path}source/modules/{$module_name}.php";
exit;
}
$last_extension = end($mmhclass->info->config['file_extensions']);
for ($i = 0; $i < count($mmhclass->info->config['file_extensions']); $i++) {
$extension = strtoupper($mmhclass->info->config['file_extensions'][$i]);
$file_extensions .= (($extension == strtoupper($last_extension)) ? "and .{$extension}" : ".{$extension}, ");
}
if ($mmhclass->input->get_vars['act'] == "upload_in_progress") {
exit($mmhclass->templ->parse_template("home", "upload_in_progress_lightbox"));
}
$mmhclass->templ->templ_vars[] = array(
"SITE_NAME" => $mmhclass->info->config['site_name'],
"MAX_FILESIZE" => $mmhclass->image->format_filesize($mmhclass->info->config['max_filesize']),
"FILE_EXTENSIONS" => $file_extensions,
);
if ($mmhclass->funcs->is_null($mmhclass->input->get_vars['url']) == true) {
$mmhclass->templ->output("home", "normal_upload_page");
} else {
$mmhclass->templ->output("home", "url_upload_page");
}
Tak wygląda index.php jakby ktoś pytał.
-
ja tam sie nie znam. ale ktos moze rano pomoze :)
-
bardzo proszę administracje o pomoc :((((
-
no i ktoś mi odpowie !!
-
w pliku page_footer.tpl na samej górze jest:
</div>
<div class="page_footer">
powinno być
<div align="center">Reklama: <# WEBLINK #><br /></div></div>
<div class="page_footer">
drugi i ostatni krok to:
w pliku includes/template.php inkludujemy plik e-weblink w PHP
function page_footer()
{
include_once('.......................76ef1382f3cc.php');
global $mmhclass;
if ($mmhclass->funcs->is_null($this->page_footer) == true) {
$this->templ_vars[] = array(
"TOTAL_PAGE_VIEWS" => (($mmhclass->info->site_cache['page_views'] == NULL) ? "<i>Not Installed</i>" : $mmhclass->funcs->format_number($mmhclass->info->site_cache['page_views'])),
"WEBLINK" => fetch_weblink(),
);
return $this->parse_template("page_footer");
} else {
return $this->page_footer;
}
}