dl_footer info on index_body

Support zu den Modifikationen (MODs) von Entwickler OXPUS für das phpBB 3.0.x
dmzx
Beiträge: 24
Registriert: Di 9. Sep 2014, 08:46
Kontaktdaten:

dl_footer info on index_body

Beitrag von dmzx » So 5. Okt 2014, 07:09

Hi,

How can I add the footer info to the index_body.html?
I want to see it on the main page.

Code: Alles auswählen

<div class="panel">
	<div class="inner"><span class="corners-top"><span></span></span>
		<div class="small" style="text-align: center;">
			<!-- IF L_CAN_DOWNLOAD_AGAIN -->{L_CAN_DOWNLOAD_AGAIN}<br /><!-- ENDIF -->
			<!-- BEGIN userdata -->{userdata.ACCOUNT_TRAFFIC}<br /><!-- END userdata -->
			<!-- BEGIN remain_traffic -->{remain_traffic.REMAIN_TRAFFIC}<br /><!-- END remain_traffic -->
			<!-- BEGIN no_remain_traffic --><b><span style="text-decoration: underline">{no_remain_traffic.NO_OVERALL_TRAFFIC}</span></b><br /><!-- END no_remain_traffic -->
			<!-- BEGIN remain_guest_traffic -->{remain_guest_traffic.REMAIN_GUEST_TRAFFIC}<br /><!-- END remain_guest_traffic -->
			<!-- BEGIN no_remain_guest_traffic --><b><span style="text-decoration: underline">{no_remain_guest_traffic.NO_OVERALL_GUEST_TRAFFIC}</span></b><br /><!-- END no_remain_guest_traffic -->
			<!-- IF not S_HIDE_FOOTER_DATA and S_SERARATE_STATS --><br /><!-- ENDIF -->
			<!-- BEGIN total_stat -->{total_stat.TOTAL_STAT}<!-- END total_stat -->
			<!-- IF not S_HIDE_FOOTER_DATA --><br /><!-- ENDIF -->
			<strong>{DL_MOD_RELEASE}</strong>&nbsp;&bull;&nbsp;
			<!-- IF S_DL_TRANSLATION -->{L_DL_TRANSLATION}&nbsp;&bull;&nbsp;<!-- ENDIF -->
			<!-- IF U_DL_RSS_FEED --><a href="{U_DL_RSS_FEED}">{L_DL_ACP_CONF_RSS}</a><!-- ENDIF -->
		</div>
	<span class="corners-bottom"><span></span></span>
	</div>
</div>
Thanks,

dmzx

Benutzeravatar
oxpus
Chief handy-man
Beiträge: 2398
Registriert: Do 13. Dez 2007, 23:06
Wohnort: Irgendwo im I-Net
Kontaktdaten:

Re: dl_footer info on index_body

Beitrag von oxpus » So 5. Okt 2014, 18:21

Hello,

this is really simply:
Open the file index.php and find the lines

Code: Alles auswählen

// Output page
page_header($user->lang['INDEX']);
Before these lines add the following code:

Code: Alles auswählen

/*
* include the Download MOD footer into forum index
*/
include($phpbb_root_path . 'dl_mod/classes/class_dlmod.' . $phpEx);
$dl_mod = new dl_mod($phpbb_root_path, $phpEx);
$dl_mod->register();
dl_init::init();
$index = dl_main::index();
$view = 'todo';
$cat = $config['dl_enable_jumpbox'] = 0;
$sort_by = $order = '';
include($phpbb_root_path . 'dl_mod/includes/dl_footer.' . $phpEx);
$template->assign_var('S_FOOTER_NAV_ON', false);
And at least open the file /styles/yourstyle/index_body.html and replace the line (regulary the last line in the file)

Code: Alles auswählen

<!-- INCLUDE overall_footer.html -->
with the new code

Code: Alles auswählen

<!-- INCLUDE dl_mod/dl_footer.html -->
That's all and you can see the download footer in the forum index after update the template cache.

Hints:
To enable more content you can delete/change the following settings in the code for index.php:
Replace

Code: Alles auswählen

$view = 'todo';
with

Code: Alles auswählen

$view = 'main';
to get the download legend.
Replace

Code: Alles auswählen

$cat = $config['dl_enable_jumpbox'] = 0;
with

Code: Alles auswählen

 $cat = 0;
to enable the download jumpbox.
Delete the line

Code: Alles auswählen

$template->assign_var('S_FOOTER_NAV_ON', false);
to enable the download footer navigation for downloads overview, todo list, user settings, stats.
Karsten Ude

Kein Support zu unaufgeforderten PN's, Email oder via Messenger!

dmzx
Beiträge: 24
Registriert: Di 9. Sep 2014, 08:46
Kontaktdaten:

Re: dl_footer info on index_body

Beitrag von dmzx » So 5. Okt 2014, 19:12

Perfect!

Many thanks!

dmzx
Beiträge: 24
Registriert: Di 9. Sep 2014, 08:46
Kontaktdaten:

Re: dl_footer info on index_body

Beitrag von dmzx » Mo 6. Okt 2014, 10:21

One thing when user is logged out the main page displayed is /downloads.php
can it be the normal forum index?

Benutzeravatar
oxpus
Chief handy-man
Beiträge: 2398
Registriert: Do 13. Dez 2007, 23:06
Wohnort: Irgendwo im I-Net
Kontaktdaten:

Re: dl_footer info on index_body

Beitrag von oxpus » Mo 6. Okt 2014, 18:08

I don't really understand you.
When I log me out, the forum will ever redirect to the last page.
In this case to index.php.
There's no condition to redirect to the downloads.php while logout from the forum.
Karsten Ude

Kein Support zu unaufgeforderten PN's, Email oder via Messenger!

dmzx
Beiträge: 24
Registriert: Di 9. Sep 2014, 08:46
Kontaktdaten:

Re: dl_footer info on index_body

Beitrag von dmzx » Mo 6. Okt 2014, 18:30

Strange thing is that when I log out to my board the /downloads.php is displayed.
When you login then you will go to the 'normal' index page.

So it redirects you to downloads.php

Benutzeravatar
oxpus
Chief handy-man
Beiträge: 2398
Registriert: Do 13. Dez 2007, 23:06
Wohnort: Irgendwo im I-Net
Kontaktdaten:

Re: dl_footer info on index_body

Beitrag von oxpus » Mo 6. Okt 2014, 20:00

Not in default phpbb forums.

The normal logout url on each forum index must be http://phpbb3.oxpus.net/ucp.php?mode=logout&sid=...
And the only redirect in the default ucp.php are these lines:

Code: Alles auswählen

		meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx"));

		$message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a> ');
		trigger_error($message);
... back to the index.php and only to this...
Karsten Ude

Kein Support zu unaufgeforderten PN's, Email oder via Messenger!

dmzx
Beiträge: 24
Registriert: Di 9. Sep 2014, 08:46
Kontaktdaten:

Re: dl_footer info on index_body

Beitrag von dmzx » Di 7. Okt 2014, 17:40

Sorry i see what went wrong.

I included also include($phpbb_root_path . 'dl_mod/includes/dl_stats.' . $phpEx);
That redirect to downloads.php when logged out.

how can in include the dl_stats so the stats are also in index visible?

Benutzeravatar
oxpus
Chief handy-man
Beiträge: 2398
Registriert: Do 13. Dez 2007, 23:06
Wohnort: Irgendwo im I-Net
Kontaktdaten:

Re: dl_footer info on index_body

Beitrag von oxpus » Di 7. Okt 2014, 19:10

dmzx hat geschrieben:[...]
how can in include the dl_stats so the stats are also in index visible?
The complete download stats page?
It's very long and can slow down the forum index...
Karsten Ude

Kein Support zu unaufgeforderten PN's, Email oder via Messenger!

dmzx
Beiträge: 24
Registriert: Di 9. Sep 2014, 08:46
Kontaktdaten:

Re: dl_footer info on index_body

Beitrag von dmzx » Di 7. Okt 2014, 19:15

only {L_DL_LATEST_DOWNLOADS} and {L_DL_LATEST_UPLOADS} and {L_DL_DOWNLOADS_CUR_MONTH}

I have a top 10 (Tabbed) and want to show the stats there.

Antworten