vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Admins informations page (https://vborg.vbsupport.ru/showthread.php?t=51279)

nagasadow 04-07-2003 12:11 PM

A nice hack, as always ;) Works fine on my board ;)

grog6 04-07-2003 12:17 PM

Quote:

Today at 01:17 PM Zelda-King said this in Post #9
It's those template names. My board doesn't like them. I create admin_affich. Fine! I create admin_fin (or ANYTHING ELSE) and I get;
Database error in vBulletin Control Panel 2.3.0:

Invalid SQL: INSERT INTO template (templateid,templatesetid,title,template) VALUES (NULL,'4','admin_fin','biscuit')
mysql error: Duplicate entry '65535' for key 1

mysql error number: 1062

Date: Monday 07th of April 2003 06:09:55 AM
Script: http://www.gamercrossfire.net/bb/bb/admin/template.php
Referer:


I'm using version 2.3.0, by the way. I'm starting to wonder though, if there's something wrong with my board. :/


heum ... don't see well your problem !
Where do you have this error ? Has the hack been installed correctly ?

Why do you insert in the template 'admin_fin' the value 'biscuit' ?! :pirate:

I'm sure I could help you but give me more informations ;)

Zelda-King 04-07-2003 02:47 PM

The hack was installed correctly. It was something to do with my database. I brought this up on vbulletin.com telling them the exact error. They gave me a query to run and that fixed it.

The value 'biscuit' was just one of my tests to make sure there was nothing wrong with the 'actual' template code.

[Code deleted]

Mathiau 04-10-2003 05:45 AM

hey m8, great hack - curious - i get this error @ the top of my admin_page.php:

Code:

Warning: Division by zero in E:\wwwroot\forum\admin_page.php on line 72

Warning: Division by zero in E:\wwwroot\forum\admin_page.php on line 79


i ran the query - the page shows everything okay but i just get that error

Also, my admin page.php is in french - but i used the english version?

Mathiau 04-10-2003 06:01 AM

never mind got it - but still have above problem?

grog6 04-10-2003 12:55 PM

For your problem of division by 0 mathiau,

I think it's cauz you used it on your local machine ?!
It shows this error because the admin has created 0 post and 0 thread ;)

This is quite impropable on a real forum ;)

In the admin_page.php, find

PHP Code:

$userinfo[pthread] = round(($nbethreaduser $nbethread) * 100,2); 

and replace it with

PHP Code:

if ($nbethread>0) {
$userinfo[pthread] = round(($nbethreaduser $nbethread) * 100,2);}

else { 
$userinfo[pthread]=0;} 


then replace

PHP Code:

$userinfo[ppost] = round(($userinfo[posts] / $nbepost) * 100,2); 

by

PHP Code:

if ($nbepost>0) {
$userinfo[ppost] = round(($userinfo[posts] / $nbepost) * 100,2);}

else { 
$userinfo[ppost]=0;} 


Don't have tried it but it should work perfectly ;)

grog6 04-10-2003 05:22 PM

Thx for the modification Zelda-King ;)

I'll integrate this code in my file ;)
I'm doing some modifications and will try to post the update during the evening ;)

Zelda-King 04-10-2003 06:34 PM

Yes, but I found out it's not a code I'm allowed to post. I've therefore deleted it. I hope you took it down. If not I'll have to send it privately.

Mathiau 04-10-2003 07:53 PM

Quote:

[i]Today at 08:49 AM grog6

I think it's cauz you used it on your local machine ?!
It shows this error because the admin has created 0 post and 0 thread ;)

[/B]



yep - did do it locally on my server, but that did the trick.

i have a habit of not posting anything @ all - installing all the hacks, then adding forums, and test posts :)

grog6 04-13-2003 12:43 PM

So, I've made a RLZ of this hack to improve it a little ...

here are modifications :


Modifications between v1.0 & 1.1.0 :
- display a default image if the admin hasn't put one yet
- automatically resizing of the admin's pic if the width is more than 300 pix (you can modify it in the admin_page.php ;) ), the image is shown as a thunbmail and is a clicakble link to enlarge and view it in its real size (Thx to the-jedi for having given me the agreement to use his function)
- Use of nopermissions informations of your forum
- modification of the link in the memberlist to the user's profile. If the member is an admin, the link will be modified and will now guide you to the admin's profile page of my hack :)


For pepole who have already installed this hack, just make these modifiactions :

In memberlist.php find :
PHP Code:

while ($userinfo=$DB_site->fetch_array($users) and $counter++<$perpage) { 

and add under :
PHP Code:

if ($userinfo[groupid]==6)
    
$lien="admin_page.php?action=affich&id=$userinfo[userid]";    else $lien="member.php?s=$session[sessionhash]&action=getinfo&userid=$userinfo[userid]"


replace the file admin_page.php by the new in the archive
and upload the image no_pic.gif in your style's directory

Then in the template admin_affich, replace

<img src="$info[photo].....> by $info[photo]





Alors voila la new version, au programme des modifs :


- Affichage d'une image par defaut si l'admin n'en a pas encore mis
- Redimensionnement automatique de la photo de l'admin si celle ci est superieure a une certaine dimension, l'image se transforme alors en lien qui pointe vers l'image dans sa taille reelle cette fois ;) (merci a the-jedi pour cette modif et m'avoir permis de l'utiliser :) )
- Utilise les infos nopermissions du forum
- Modification du lien dans le memberlist qui pointe vers le profil du membre, si le membre est un admin alors ce lien pointe vers son profil admin ;)

Je mets le zip a jour

Pour ceux qui ont deja installe la version precedente (darki ;) )
Fais ces modifs

dans le template memberlistbit, trouvez :

PHP Code:

member.php?s=$session[sessionhash]&action=getinfo&userid=$userinfo[userid


et remplacez par $lien


Dans memberlist.php trouvez :
PHP Code:

while ($userinfo=$DB_site->fetch_array($users) and $counter++<$perpage) { 

et ajoutez en dessous :
PHP Code:

if ($userinfo[groupid]==6)
    
$lien="admin_page.php?action=affich&id=$userinfo[userid]";    else $lien="member.php?s=$session[sessionhash]&action=getinfo&userid=$userinfo[userid]"


et remplacer le admin_page.php par celui du nouveau zip
et apres mettre l'image no_pic.gif dans les differents repertoire images de vos styles



ah vi et aussi modifier dans le template admin_affich le

<img src="$info[photo].....> par $info[photo]


All times are GMT. The time now is 03:34 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01201 seconds
  • Memory Usage 1,767KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (9)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete