vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Toplist (https://vborg.vbsupport.ru/showthread.php?t=98646)

Ramsesx 03-06-2006 09:27 PM

It was gif and jpg format. But as mentioned before it was possible to add it from the acp.

derekivey 03-06-2006 09:46 PM

Hmm, can you PM me the url to your forum so I can try it? It should let you upload gif and jpg images. Maybe even try reuploading the .php files.

Derek

derfelix 03-10-2006 03:56 AM

Very nice hack...
suggestions for future versions (maybe suggested before didn't real ALL of the 38 pages)

* an automatic check if the site has included your code (removal or suspension if your code has been removed)

* point system for users that have lots of ins (if a user comes from their site.. an registers .. addition to referrer?)

* usage of real banners.. (most sites have) instead of buttons..(or choice) with automatic resizing if banner is not the exact requested size...

these are just suggestions
it is great as is

Felix

derfelix 03-10-2006 05:16 PM

been testing it .. and it is great...

found one little bug.. (or feature? :surprised: )

Example:
A user uploads a pic.. and the sitename, description etc...
everything is fine..

now the user sees he has a typo in the text.. so he edits it.
when he saves it.. everything is fine..
BUT: the picture is gone.. as a matter of fact the file is still there..
but somehow in the db it is gone.. the user sees a broken image.

I think its a little bug in edit_site.php

because when you edit your sites it stores the $key variable into the database. BUT if you have not modified the image.. the variable $key is not defined anywhere (actually it takes the $key variable out of the included global.php)

My workaround is the following (maybe there is a more elegant way to do it)
First make a backup copy of edit_site.php


in edit_site.php
find:
PHP Code:

if (!empty($vbulletin->GPC['image']['name'])) 

above add:
PHP Code:

$query_key ""

a little lower find:
PHP Code:

$height $size[1]; 

below add:
PHP Code:

                    $query_key ", imagecode='" $key "' WHERE id='" $vbulletin->GPC['id'] . "'"

and finally find:
PHP Code:

                        imagesize='".$image_size."',
                        
imagecode='".$key."' WHERE id='".$vbulletin->GPC['id']."'"; 

and replace with:

PHP Code:

                        imagesize='" . $image_size . "'" . $query_key . ""; 

this is just a first guess..
maybe its not very elegant.. but it works for me.

which meens that when i edit a site without changing the image.. it does not delete the image.

Felix

-----------
As for the second little problem.. the dynamic image not showing.. its a problem with my localhost apache (test environment) that does not accept .htacess (but some providers dont either).

so what i did was:
rename the file image.png to image.php
then in the template Toplist_HTML_Code i replaced all 4 instances of image.png with image.php

for me its working now!!

Josh1 03-10-2006 05:25 PM

Which XML do i use??

derekivey 03-10-2006 06:57 PM

Quote:

Originally Posted by derfelix
been testing it .. and it is great...

found one little bug.. (or feature? :surprised: )

Example:
A user uploads a pic.. and the sitename, description etc...
everything is fine..

now the user sees he has a typo in the text.. so he edits it.
when he saves it.. everything is fine..
BUT: the picture is gone.. as a matter of fact the file is still there..
but somehow in the db it is gone.. the user sees a broken image.

I think its a little bug in edit_site.php

because when you edit your sites it stores the $key variable into the database. BUT if you have not modified the image.. the variable $key is not defined anywhere (actually it takes the $key variable out of the included global.php)

My workaround is the following (maybe there is a more elegant way to do it)
First make a backup copy of edit_site.php


in edit_site.php
find:
PHP Code:

if (!empty($vbulletin->GPC['image']['name'])) 

above add:
PHP Code:

$query_key ""

a little lower find:
PHP Code:

$height $size[1]; 

below add:
PHP Code:

                    $query_key ", imagecode='" $key "' WHERE id='" $vbulletin->GPC['id'] . "'"

and finally find:
PHP Code:

                        imagesize='".$image_size."',
                        
imagecode='".$key."' WHERE id='".$vbulletin->GPC['id']."'"; 

and replace with:

PHP Code:

                        imagesize='" . $image_size . "'" . $query_key . ""; 

this is just a first guess..
maybe its not very elegant.. but it works for me.

which meens that when i edit a site without changing the image.. it does not delete the image.

Felix

-----------
As for the second little problem.. the dynamic image not showing.. its a problem with my localhost apache (test environment) that does not accept .htacess (but some providers dont either).

so what i did was:
rename the file image.png to image.php
then in the template Toplist_HTML_Code i replaced all 4 instances of image.png with image.php

for me its working now!!

It must be a bug, I could have swore I had it not change anything if they left the image field blank. Hmm. I will take a look and fix it.

Quote:

Originally Posted by Josh1
Which XML do i use??

product-toplist.xml

derfelix 03-11-2006 08:07 AM

actually in the db it was not gone (i wrote that before i took a closer look)
the value of the $key variable was replaced by the one created in global.php

thx for looking in to it

Felix

Josh1 03-11-2006 12:50 PM

Ok, everything works fine, cept when I try to access the page:
you do not have permission to access this page. This could be due to one of several reasons:

1. Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
2. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

derekivey 03-11-2006 01:31 PM

You have to set the usergroup permissions for each user in the Usergroup manager.

derfelix 03-11-2006 01:56 PM

AH and there is one (maybe the most important) thing I am missing..

Usually in a ranking list you can set after how many ins the banner appears!

I run a standalone toplist where it is set to 5, so only after 5 ins the banner of the user is up..

(because that is the only way you can get people to post a link towards you)
i guess it must be somewhere in the settings.. and I missed it.
If not.. this is a BIIIG request!
Felix


All times are GMT. The time now is 04:28 AM.

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.02298 seconds
  • Memory Usage 1,772KB
  • 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
  • (12)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)pagenav_pagelinkrel
  • (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