Warning: The author of this contribution does not provide support for it anymore.

Ajax base

image and blog post count? - Ajax base

image and blog post count?

by Danielx64 » Sun Nov 21, 2010 10:31 pm

Hello,

I got 2 mods installed, User Blog Mod 1.0.13 and phpbb gallery 1 0 5 and I'm wondering how I can make the counters update like it does for the post and topics

Thanks
Please note that I will not be porting any of my mods to phpBB 3.1. Sorry for the inconvenience this may cause.
Image
Danielx64
Registered User
Posts: 1369
Joined: Wed Nov 04, 2009 5:51 am
Location: In a server room in Australia
Name: Daniel
Contact:

Re: image and blog post count?

by Senky » Mon Nov 22, 2010 12:12 pm

This is quite simple, just look at the file ajax_base.php and how it works.
‎‏‏ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‎‏‎‏‏‎ ‎ ‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎🔔
Browser & Mobile Notifications Extension
Now with Safari (both macOS and iOS) support!
Senky
Former Team Member
Posts: 2300
Joined: Thu Apr 30, 2009 8:49 pm
Name: Jakub
Contact:

Re: image and blog post count?

by Senky » Mon Nov 22, 2010 12:13 pm

This is quite simple, just look at the file ajax_base.php and how it works.
‎‏‏ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‎‏‎‏‏‎ ‎ ‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎🔔
Browser & Mobile Notifications Extension
Now with Safari (both macOS and iOS) support!
Senky
Former Team Member
Posts: 2300
Joined: Thu Apr 30, 2009 8:49 pm
Name: Jakub
Contact:

Re: image and blog post count?

by Danielx64 » Mon Nov 22, 2010 9:40 pm

I'll have another go at it, but when I tried to do it, nothing was coming up.
Please note that I will not be porting any of my mods to phpBB 3.1. Sorry for the inconvenience this may cause.
Image
Danielx64
Registered User
Posts: 1369
Joined: Wed Nov 04, 2009 5:51 am
Location: In a server room in Australia
Name: Daniel
Contact:

Re: image and blog post count?

by Senky » Tue Nov 23, 2010 3:41 pm

You should also checkout the function and <span> ids - as they are connected and how it works as one unit.
‎‏‏ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‎‏‎‏‏‎ ‎ ‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎🔔
Browser & Mobile Notifications Extension
Now with Safari (both macOS and iOS) support!
Senky
Former Team Member
Posts: 2300
Joined: Thu Apr 30, 2009 8:49 pm
Name: Jakub
Contact:

Re: image and blog post count?

by PiperB » Sun Jun 11, 2017 2:29 am

For Gallery and blog mod Compatibility

Open: root/ajax_base.php

Find:

Code: Select all

	  $l_total_topic_s = ($config['num_topics'] == 0) ? 'TOTAL_TOPICS_ZERO' : 'TOTAL_TOPICS_OTHER';
Add After: (On a new blank line)

Code: Select all

	  if (class_exists('phpbb_gallery_integration'))
{
	phpbb_gallery_integration::index_total_images();
}
Save the file.

//Prosilver

Open: styles/prosilver/template/ajax_base/statistics.html

Find:

Code: Select all

{TOTAL_TOPICS} &bull;
In-Line Add After:

Code: Select all

 <!-- IF TOTAL_IMAGES -->{TOTAL_IMAGES} &bull;<!-- ENDIF -->
Find:

Code: Select all

{TOTAL_USERS} &bull;
In-Line Add After:

Code: Select all

 {TOTAL_BLOG_ENTRIES} &bull;
Save the file.

//Subsilver2

Open: styles/subsilver2/template/ajax_base/statistics.html

There is a file here in another post about subsilver2 edits or you can create your own.

Select all text in the file and replace with:

Code: Select all

<p class="genmed">{TOTAL_POSTS} | {TOTAL_TOPICS} | <!-- IF TOTAL_IMAGES -->{TOTAL_IMAGES} |<!-- ENDIF --> {TOTAL_USERS} | {TOTAL_BLOG_ENTRIES} | {NEWEST_USER}</p>
Save the file and you're done.

Disclaimer: I decided to share my edits and fixes for "wiki" type purposes and for those out there like me who are on older versions of phpbb3 still. Also for those who still have or wanted this mod to be compatible with these other mods, this is for you. :)
<!-- IF U_LOVE_NOTEPAD++ -->
[td class=statement]I Notepad++ ![/td]
<!-- ENDNEVER --> <!-- tee hee --> :P
Whoa ooo whoa ooo whoa I'm a Lady!
User avatar
PiperB
Registered User
Posts: 173
Joined: Mon Nov 07, 2016 6:54 pm
Contact: