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)

loonytune15 08-10-2006 01:50 PM

has the site been verified?

Beller 08-10-2006 03:22 PM

I recently upgraded & I get this error when I run the In Code Validation

Fatal error: Call to a member function on a non-object in /home/boardsie/public_html/forum/includes/cron/toplist.php on line 47
Any Ideas. I am running 3-6-0 BTW
Is there any relevance in what in entered in varname?

derekivey 08-10-2006 03:39 PM

Quote:

Originally Posted by Beller
I recently upgraded & I get this error when I run the In Code Validation

Fatal error: Call to a member function on a non-object in /home/boardsie/public_html/forum/includes/cron/toplist.php on line 47
Any Ideas. I am running 3-6-0 BTW
Is there any relevance in what in entered in varname?

I don't think the cron will work with 3.6, I heard that vB changed some stuff with the cron system, so this is something I will have to look at before I release a 3.6 version.

derekivey 08-10-2006 03:40 PM

Quote:

Originally Posted by gamelandz
the link is not showing

First, make sure the usergroup has edit permissions.

If that doesn't work, please try the fix in this post: https://vborg.vbsupport.ru/showpost....&postcount=945

Derek

Beller 08-10-2006 03:52 PM

Quote:

Originally Posted by derekivey
I don't think the cron will work with 3.6, I heard that vB changed some stuff with the cron system, so this is something I will have to look at before I release a 3.6 version.

It still seems to do the job. It has removed any sites without links.
Anyway I look forward to a 3-6-0- update.

oberheimhaven 08-10-2006 11:20 PM

in Admin Cp also how do you give user permission I checked its no where to be found I loaded everything to the tee? Any help would be appreciated thanks for the great hack

Never mind spoke to soon it was the cron and xml

\ great hack mate@@@

www.musiciansquarters.com
More than just another guitar site!!

derekivey 08-11-2006 07:20 PM

Quote:

Originally Posted by Beller
It still seems to do the job. It has removed any sites without links.
Anyway I look forward to a 3-6-0- update.

Oh I see whats causing the error. Do this to fix it...

Open includes/cron/toplist.php

Find:
PHP Code:

$db->free_result($sites2); 

Replace With:
PHP Code:

$vbulletin->db->free_result($sites2); 

Close & Save.

McMendo 08-13-2006 07:18 PM

I copied the files via ssh in the server, putting each file in its directory and changing owner and group according to the rest of vbulletin files. I had to create the subdirectories under images/

Then I imported the xml file from AdminCP -> Plugin System -> Manage Products
It required to fill all the fields. I haven't found any "Product ID" so I filled them as follows:
Quote:

Product ID: toplist_1_0_9
Title: Toplist
Version: 1.0.9
Description: (brief description)
Step #4 of installation says:
4. Edit each usergroup's permissions at the very bottom set the Toplist Permissions to what ever you want for each usergroup.

But I cannot see any toplist permissions on usergroup's permissions.

Further, after restarting the browser and re-loging in AdminCP I cannot see any Toplist Category on the AdminCP Nav.

I'm lost.. :(

derekivey 08-13-2006 07:43 PM

Looks like you created a product for that, which is only needed if you are making hacks. Instead delete that product, and import the product xml file that came in the zip file and it that stuff should show up for you.

Derek

majoreyeswater 08-13-2006 08:35 PM

I've searched through the thread but I am still struggling.

I've copied all the files and I've imported the xml product file.

The top list options are available to edit in admincp options, but I cannot find the toplist permissions in the usergroup settings.

I edit a particular usergroup (e.g. registered members) and cannot find anywhere in there where one edits the toplist settings.

Any help appreciated.

Allan 08-13-2006 08:52 PM

Hey Derek

Do you have released your hack for vB 3.6 ?

derekivey 08-13-2006 09:15 PM

Not yet, seems to work fine on 3.6 though. I plan to release a 3.6 version for the next release.

McMendo 08-15-2006 09:40 AM

Quote:

Originally Posted by derekivey
Looks like you created a product for that, which is only needed if you are making hacks. Instead delete that product, and import the product xml file that came in the zip file and it that stuff should show up for you.

Thank you. I don't know how it happened.

Now it's installed. Some issues:

I want toplist to be public viewable, not just for allowed usergroups. How do I go about that? (there is no usergroup "all" to allow view toplist).

Non logged viewers get this message:
Quote:

You are not logged in or you do not have permission to access this page
I am a secret administrator, and as such I get:
Quote:

Tom, 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.

Also, I've added my first site with the image of the site. First I downloaded the image to my computer and uploaded it to the site on topfield. It doesn't show. I edited the site and in fact the field was blank. I typed the URL to the image. It still doesn't show and when I go to edit the site again the image field is blank.

I have increased max. width and height to 325x60 and max. size to 100,000. The file extensions allowed are: jpg jpeg gif (I've also tried with commas too: jpg, jpeg, gif). To no avail.

McMendo 08-15-2006 02:37 PM

Quote:

Originally Posted by McMendo
Thank you. I don't know how it happened.

Now it's installed. Some issues:

I want toplist to be public viewable, not just for allowed usergroups. How do I go about that? (there is no usergroup "all" to allow view toplist).

Non logged viewers get this message:I am a secret administrator, and as such I get:

Big apologies. Too little sleep these days. View permissions are clear now.

The problem with the images still remains though..
Quote:

Also, I've added my first site with the image of the site. First I downloaded the image to my computer and uploaded it to the site on topfield. It doesn't show. I edited the site and in fact the field was blank. I typed the URL to the image. It still doesn't show and when I go to edit the site again the image field is blank.

I have increased max. width and height to 325x60 and max. size to 100,000. The file extensions allowed are: jpg jpeg gif (I've also tried with commas too: jpg, jpeg, gif). To no avail.
Also, how can I make the description longer? I need to add some html code to indicate the language: <font color="red"><b>[in Language]</b></font>

derekivey 08-15-2006 03:28 PM

Quote:

Originally Posted by McMendo
Thank you. I don't know how it happened.

Now it's installed. Some issues:

I want toplist to be public viewable, not just for allowed usergroups. How do I go about that? (there is no usergroup "all" to allow view toplist).

Non logged viewers get this message:I am a secret administrator, and as such I get:


Also, I've added my first site with the image of the site. First I downloaded the image to my computer and uploaded it to the site on topfield. It doesn't show. I edited the site and in fact the field was blank. I typed the URL to the image. It still doesn't show and when I go to edit the site again the image field is blank.

I have increased max. width and height to 325x60 and max. size to 100,000. The file extensions allowed are: jpg jpeg gif (I've also tried with commas too: jpg, jpeg, gif). To no avail.

Just edit the permissions for each usergroup to allow access to view (and add and edit to the ones you want to allow to edit), if you want people who aren't logged in to view it edit the permissions for the Guest usergroup to allow them to view it.

For your second problem, don't include commas in the sizes, and also make sure you CHMODed the images/toplist/buttons/sites/ folder to 777.

Derek

derekivey 08-15-2006 03:29 PM

Quote:

Originally Posted by McMendo
Also, how can I make the description longer? I need to add some html code to indicate the language: <font color="red"><b>[in Language]</b></font>

You will have to add that code to the Toplist_1 and Toplist_2 templates. Find something like $sr[description] (I think thats the variable I use), and put the html code in front of it, and the closing html tag after it.

Derek

McMendo 08-15-2006 06:13 PM

Quote:

Originally Posted by derekivey
You will have to add that code to the Toplist_1 and Toplist_2 templates. Find something like $sr[description] (I think thats the variable I use), and put the html code in front of it, and the closing html tag after it.

Derek

That didn't work for <font color>. It does for <center> though.

derekivey 08-15-2006 06:17 PM

Paste the code you used so I can take a look.

Thanks,
Derek

majoreyeswater 08-16-2006 03:31 PM

Quote:

Originally Posted by majoreyeswater
I've searched through the thread but I am still struggling.

I've copied all the files and I've imported the xml product file.

The top list options are available to edit in admincp options, but I cannot find the toplist permissions in the usergroup settings.

I edit a particular usergroup (e.g. registered members) and cannot find anywhere in there where one edits the toplist settings.

Any help appreciated.

If I've missed something then let me know, but I can't see a toplist entry in the usergroup settings so no one has permission to use the service.

Where are the usergorup settings for this mod?

Thanks in advance.

derekivey 08-16-2006 05:02 PM

Did you upload the xml file for it into includes/xml?

McMendo 08-16-2006 08:37 PM

Quote:

Originally Posted by derekivey
Paste the code you used so I can take a look.

Thanks,
Derek

Toplist_1:
<td class="alt1"><a href="$vboptions[bburl]/out.php?id=$sr[id]" target="_BLANK">$sr[name]</a><br /><center><font color="FF0000" size="-1">$sr[description]</font></center>

Toplist_2:
<td class="alt1"><a href="$vboptions[bburl]/out.php?id=$sr[id]">$sr[name]</a><br /><center><font color="FF0000" size="-1">$sr[description]</font></center>


Even if it worked that would affect the entire description, wouldn't it?

What I need is this:

This is the description for a site in English language.
[in English]


This is the description for a site in Russian language.
[in Russian]


etc.

derekivey 08-17-2006 12:31 AM

Try replacing:
HTML Code:

<font color="FF0000"
With:
HTML Code:

<font color="#FF0000"
Derek

derekivey 08-17-2006 12:32 AM

Also, why is the size -1?

Robbed 08-21-2006 09:00 PM

Is it possible to use banners with this hack instead of buttons?

Shazz 08-21-2006 09:06 PM

Quote:

Originally Posted by Robbed
Is it possible to use banners with this hack instead of buttons?

You could do something like
Admin CP> Toplist(left side) > Toplist Options> Maximum Image Height and Maximum Image Width(middle of the page) change it to whatever you wanted :cool:
________
Ford Escape Hybrid history

Robbed 08-21-2006 09:08 PM

I would have to edit the templates too?

Shazz 08-21-2006 09:20 PM

Quote:

Originally Posted by Robbed
I would have to edit the templates too?

Not that im aware of .
________
Mercedes-Benz W112 history

derekivey 08-21-2006 09:34 PM

Only if you want to change the layout. For my friend's site, I moved the images below the description's and deleted the extra column for the buttons. I am thinking of adding a setting to choose between that layout or the current layout.

Derek

Robbed 08-21-2006 10:03 PM

Quote:

Originally Posted by derekivey
Only if you want to change the layout. For my friend's site, I moved the images below the description's and deleted the extra column for the buttons. I am thinking of adding a setting to choose between that layout or the current layout.

Derek

That would be great I was looking for something like that.

Could i get the template edits?

Thanks

Rob

derfelix 08-22-2006 04:10 PM

Quote:

Originally Posted by derekivey
Only if you want to change the layout. For my friend's site, I moved the images below the description's and deleted the extra column for the buttons. I am thinking of adding a setting to choose between that layout or the current layout.

Derek

I second that request...
+ have the site "title" in bold

(most sites have the classic 468x60 banners)

Felix

Celtic_Mad 08-23-2006 03:45 PM

Does this work for 3.6.0?

derekivey 08-23-2006 09:59 PM

Quote:

Originally Posted by Celtic_Mad
Does this work for 3.6.0?

Seems to be working fine for me on my dev board.

derekivey 08-23-2006 09:59 PM

Quote:

Originally Posted by Robbed
That would be great I was looking for something like that.

Could i get the template edits?

Thanks

Rob

Sure, I will post them shortly.

Derek

b6gm6n 08-24-2006 04:42 PM

problem...fixed!

Snake 08-24-2006 10:38 PM

Is this gonna work on 3.6 too? I'm not sure.

Shazz 08-24-2006 10:39 PM

Quote:

Originally Posted by Dark Blade
Is this gonna work on 3.6 too? I'm not sure.

Yes! :cool:

Snake 08-24-2006 10:54 PM

Thanks!

Shazz 08-24-2006 11:01 PM

Quote:

Originally Posted by Dark Blade
Thanks!

I think majority of the 3.5 hacks should say at the bottom or top of the post that says if its capable of 3.6..

derekivey 08-25-2006 12:33 AM

Here is the code for those templates I was talking about, for if you have bigger images on the toplist.

Toplist:
PHP Code:

$stylevar[htmldoctype]
<
html dir="$stylevar[textdirection]lang="$stylevar[languagecode]">
<
head>
$headinclude
<title>$vboptions[bbtitle] - $vbphrase[toplist]</title>
<
script type="text/javascript" src="clientscript/toplist.js?version=$version"></script>
</
head>
<
body>
$header

$navbar
<if condition="$disabled != 1">
    <if 
condition="$vboptions['toplist_check_if_code_exists'] == 1 AND $validate_bits != ''">
        <
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
        <
tr align="center">
            <
td class="tcat" colspan="4">{$vbphrase['toplist_sites_pending_validation']}</td>
        </
tr>
        <
tr align="center">
            <
td class="alt1" colspan="4">$vbphrase[toplist_sites_pending_validation_desc]</td>
        </
tr>
        <
tr align="center">
            <
td class="thead">$vbphrase[toplist_site_name]</td>
            <
td class="thead">$vbphrase[toplist_site_url]</td>
            <
td class="thead">$vbphrase[toplist_edit]</td>
            <
td class="thead">$vbphrase[toplist_validate]</td>
        </
tr>
        
$validate_bits
        
<tr align="center">
            <
td class="thead" colspan="7"><div class="smallfont">&nbsp;</div></td>
        </
tr>
        </
table>
        <
br />
    </if>

    <
form action="toplist.php" method="get">
    <
table cellpadding="0" cellspacing="0" border="0" width="100%" align="right">
    <
tr align="right">
        <
td>
            <
div class="smallfont">
                
$vbphrase[toplist_select_category]: 
                <
select name="cid" onchange="this.form.submit();">
                    <
option selected="selected" value="">$vbphrase[toplist_view_all_sites]</option>
                    <
optgroup label="$vbphrase[toplist_categories]">
                        
$cat_list
                    
</optgroup>
                </
select
                <
input type="submit" class="button" value="$vbphrase[toplist_go]/>
            </
div>
        </
td>
    </
tr>
    </
table>
    </
form>
    <
br /><br />
    <if 
condition="$vboptions['toplist_show_random_sites'] == 1">
        <
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
        <
tr align="center">
            <
td class="tcat" colspan="7">{$vbphrase['toplist_random_site']}</td>
        </
tr>
        <
tr align="center">
            <
td class="thead" width="20">$vbphrase[toplist_rank]</td>
            <
td class="thead">$vbphrase[toplist_site_name_and_description]</td>
            <
td class="thead" width="50">$vbphrase[toplist_in]</td>
            <
td class="thead" width="50">$vbphrase[toplist_out]</td>
            <
td class="thead" width="50">$vbphrase[toplist_views]</td>
            <
td class="thead" width="90">$vbphrase[toplist_rating]</td>
        </
tr>
        <if 
condition="$randchk >= 1 OR $num_rows >= 1">
            <
tr align="center">
                <
td class="alt2">$rand_rank</td>
                <
td class="alt1"><a href="$vboptions[bburl]/out.php?id=$randsite[id]target="_BLANK">$randsite[name]</a><br />$randsite[description]<br />
                <if 
condition="$vboptions['toplist_show_user_banners'] == 1 AND $randsite['imagecode'] != ''">
                    <
br /><a href="$vboptions[bburl]/out.php?id=$randsite[id]target="_BLANK"><img src="$vboptions[bburl]/toplist_image.php?do=view&amp;id=$randsite[id]border="0" alt="" /></a>
                </if>
                </
td>
                <
td class="alt2" width="50">$randsite[in]</td>
                <
td class="alt1" width="50">$randsite[out]</td>
                <
td class="alt2" width="50">$randsite[views]</td>
                <
td class="alt1" width="90">
                    <if 
condition="$rating == 0">
                        
$vbphrase[toplist_not_rated]
                    <else />
                        <
img src="$vboptions[bburl]/images/rating/toplist_rating_$rating.gif" alt="" />
                        <
br />
                        
$randsite[votes
                        <if 
condition="$randsite['votes'] == 1">
                            
$vbphrase[toplist_vote]
                        <else />
                            
$vbphrase[toplist_votes]
                        </if>
                    </if>
                    <if 
condition="!$show['guest']">
                        <
br />
                        <
a href="#" onclick="javascript:window.open('$vboptions[bburl]/toplist.php?do=rate&amp;id=$randsite[id]','rate_site','menubar=0,resizable=1,width=$vboptions[toplist_popup_width],height=$vboptions[toplist_popup_height]');return false;">$vbphrase[toplist_rate_site]</a>
                    </if>
                </
td>
            </
tr>
        <else />
            <
tr align="center">
                <
td class="alt1" colspan="7">$vbphrase[toplist_none]</td>
            </
tr>
        </if>

        <
tr align="center">
            <
td class="thead" colspan="7"><div class="smallfont">&nbsp;</div></td>
        </
tr>
        </
table>
        <
br />
    </if>
</if>

<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
tr align="center">
    <
td class="tcat" colspan="7">{$vboptions[bbtitle]} {$vbphrase['toplist']}</td>
</
tr>
<
tr align="center">
    <if 
condition="$cat != 1">
        <
td class="thead" width="20">$vbphrase[toplist_rank]</td>
    </if>
    <
td class="thead">$vbphrase[toplist_site_name_and_description]</td>
    <
td class="thead" width="50">$vbphrase[toplist_in]</td>
    <
td class="thead" width="50">$vbphrase[toplist_out]</td>
    <
td class="thead" width="50">$vbphrase[toplist_views]</td>
    <
td class="thead" width="90">$vbphrase[toplist_rating]</td>
</
tr>
$html
<tr align="center">
    <
td class="thead" colspan="7">
        <
div class="smallfont">
            <if 
condition="$vboptions['toplist_enabled'] == 1 AND $permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['canaddsites']">
                <
a href="$vboptions[bburl]/add_site.php">$vbphrase[toplist_add_site]</a>
            <else />
                &
nbsp;
            </if>
        </
div>
    </
td>
</
tr>
</
table>
<
br />
<
table cellpadding="0" cellspacing="0" border="0" width="100%">
<
tr align="$stylevar[right]">
    <
td>$pagenav</td>
</
tr>
</
table>
<
br />
<
center>$last_reset</center>

$footer
</body>
</
html

Toplist_1:
PHP Code:

<tr align="center">
    <if 
condition="$cat != 1">
        <
td class="alt2">$rank</td>
    </if>
    <
td class="alt1"><a href="$vboptions[bburl]/out.php?id=$sr[id]target="_BLANK">$sr[name]</a><br />$sr[description]
    <if 
condition="$vboptions['toplist_show_user_banners'] == 1 AND $sr['imagecode'] != '' AND $sr['in'] >= $vboptions['toplist_number_of_in_hits_until_banner_shows']">
            <
br /><br /><a href="$vboptions[bburl]/out.php?id={$sr[id]}target="_BLANK"><img src="$vboptions[bburl]/toplist_image.php?do=view&amp;id=$sr[id]border="0" alt="" /></a><br />
    </if>
        <if 
condition="$bbuserinfo['username'] == $sr['username']">
            <if 
condition="$permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['caneditsites'] OR $vbulletin->bf_ugp['toplistpermissions']['candeletesites']">
                <
br />
            </if>
        <else />
            <if 
condition="$permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['canadminsites']">
                <
br />
            </if>
        </if>
        <if 
condition="$bbuserinfo['username'] == $sr['username']">
            <if 
condition="$permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['caneditsites']">
                [ <
a href="$vboptions[bburl]/edit_site.php?id=$sr[id]">$vbphrase[toplist_edit_site]</a> ]&nbsp;
            </if>
        <else />
            <if 
condition="$permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['canadminsites']">
                [ <
a href="$vboptions[bburl]/edit_site.php?id=$sr[id]">$vbphrase[toplist_edit_site]</a> ]&nbsp;
            </if>
        </if>
        <if 
condition="$bbuserinfo['username'] == $sr['username']">
            <if 
condition="$permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['candeletesites']">
                [ <
a href="$vboptions[bburl]/delete_site.php?id=$sr[id]"></if>$vbphrase[toplist_delete_site]</a> ]
            </if>
        <else />
            <if 
condition="$permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['canadminsites']">
                [ <
a href="$vboptions[bburl]/delete_site.php?id=$sr[id]"></if>$vbphrase[toplist_delete_site]</a> ]
            </if>
        </if>
        <if 
condition="!is_member_of($bbuserinfo, 1)">
            [ <
a href="#" onclick="javascript:window.open('$vboptions[bburl]/toplist.php?do=report&amp;id=$sr[id]','report','menubar=0,resizable=1,width=320,height=220');return false;">$vbphrase[toplist_report]</a> ]
        </if>
    </
td>
    <
td class="alt2" width="50">$sr[in]</td>
    <
td class="alt1" width="50">$sr[out]</td>
    <
td class="alt2" width="50">$sr[views]</td>
    <
td class="alt1" width="90">
        <if 
condition="$sr['rating_average'] == 0">
            
$vbphrase[toplist_not_rated]
        <else />
            <
img src="$vboptions[bburl]/images/rating/toplist_rating_{$rating_image}.gif" alt="" />
            <
br />
            
$sr[votes
            <if 
condition="$sr['votes'] == 1">
                
$vbphrase[toplist_vote]
            <else />
                
$vbphrase[toplist_votes]
            </if>
        </if>
        <if 
condition="!$show['guest']">
            <
br />
            <
a href="#" onclick="javascript:window.open('$vboptions[bburl]/toplist.php?do=rate&amp;id=$sr[id]','rate_site','menubar=0,resizable=1,width=$vboptions[toplist_popup_width],height=$vboptions[toplist_popup_height]');return false;">$vbphrase[toplist_rate_site]</a>
        </if>
    </
td>
</
tr

Toplist_2:
PHP Code:

<tr align="center">
    <if 
condition="$cat != 1">
        <
td class="alt2">$rank</td>
    </if>
    <
td class="alt1"><a href="$vboptions[bburl]/out.php?id=$sr[id]">$sr[name]</a><br />$sr[description]
    <if 
condition="$vboptions['toplist_show_user_banners'] == 1 AND $sr['imagecode'] != '' AND $sr['in'] >= $vboptions['toplist_number_of_in_hits_until_banner_shows']">
        <
br /><br /><a href="$vboptions[bburl]/out.php?id=$sr[id]target="_BLANK"><img src="$vboptions[bburl]/toplist_image.php?do=view&amp;id=$sr[id]border="0" alt="" /></a><br />
    </if>
        <if 
condition="$bbuserinfo['username'] == $sr['username']">
            <if 
condition="$permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['caneditsites'] OR $vbulletin->bf_ugp['toplistpermissions']['candeletesites']">
                <
br />
            </if>
        <else />
            <if 
condition="$permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['canadminsites']">
                <
br />
            </if>
        </if>
        <if 
condition="$bbuserinfo['username'] == $sr['username']">
            <if 
condition="$permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['caneditsites']">
                [ <
a href="$vboptions[bburl]/edit_site.php?id=$sr[id]">$vbphrase[toplist_edit_site]</a> ]&nbsp;
            </if>
        <else />
            <if 
condition="$permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['canadminsites']">
                [ <
a href="$vboptions[bburl]/edit_site.php?id=$sr[id]">$vbphrase[toplist_edit_site]</a> ]&nbsp;
            </if>
        </if>
        <if 
condition="$bbuserinfo['username'] == $sr['username']">
            <if 
condition="$permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['candeletesites']">
                [ <
a href="$vboptions[bburl]/delete_site.php?id=$sr[id]">$vbphrase[toplist_delete_site]</a> ]
            </if>
        <else />
            <if 
condition="$permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['canadminsites']">
                [ <
a href="$vboptions[bburl]/delete_site.php?id=$sr[id]">$vbphrase[toplist_delete_site]</a> ]
            </if>
        </if>
    </
td>
    <
td class="alt2" width="50">$sr[in]</td>
    <
td class="alt1" width="50">$sr[out]</td>
    <
td class="alt2" width="50">$sr[views]</td>
    <
td class="alt1" width="90">
        <if 
condition="$sr['rating_average'] == 0">
            
$vbphrase[toplist_not_rated]
        <else />
            <
img src="$vboptions[bburl]/images/rating/toplist_rating_{$rating_image}.gif" alt="" />
            <
br />
            
$sr[votes
            <if 
condition="$sr['votes'] == 1">
                
$vbphrase[toplist_vote]
            <else />
                
$vbphrase[toplist_votes]
            </if>
        </if>
        <if 
condition="!$show['guest']">
            <
br />
            <
a href="#" onclick="javascript:window.open('$vboptions[bburl]/toplist.php?do=rate&amp;id=$sr[id]','rate_site','menubar=0,resizable=1,width=$vboptions[toplist_popup_width],height=$vboptions[toplist_popup_height]');return false;">$vbphrase[toplist_rate_site]</a>
        </if>
    </
td>
</
tr

If you decide to go back to the old layout, simply revert those templates, and the old layout will be restored. I will have a setting in the next version to switch between the 2 layouts, so that will not be necessary in the next version.

Derek

Shazz 08-25-2006 12:35 AM

Quote:

Originally Posted by derekivey
Here is the code for those templates I was talking about, for if you have bigger images on the toplist.

Toplist:
PHP Code:

$stylevar[htmldoctype]
<
html dir="$stylevar[textdirection]lang="$stylevar[languagecode]">
<
head>
$headinclude
<title>$vboptions[bbtitle] - $vbphrase[toplist]</title>
<
script type="text/javascript" src="clientscript/toplist.js?version=$version"></script>
</
head>
<
body>
$header

$navbar
<if condition="$disabled != 1">
    <if 
condition="$vboptions['toplist_check_if_code_exists'] == 1 AND $validate_bits != ''">
        <
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
        <
tr align="center">
            <
td class="tcat" colspan="4">{$vbphrase['toplist_sites_pending_validation']}</td>
        </
tr>
        <
tr align="center">
            <
td class="alt1" colspan="4">$vbphrase[toplist_sites_pending_validation_desc]</td>
        </
tr>
        <
tr align="center">
            <
td class="thead">$vbphrase[toplist_site_name]</td>
            <
td class="thead">$vbphrase[toplist_site_url]</td>
            <
td class="thead">$vbphrase[toplist_edit]</td>
            <
td class="thead">$vbphrase[toplist_validate]</td>
        </
tr>
        
$validate_bits
        
<tr align="center">
            <
td class="thead" colspan="7"><div class="smallfont">&nbsp;</div></td>
        </
tr>
        </
table>
        <
br />
    </if>

    <
form action="toplist.php" method="get">
    <
table cellpadding="0" cellspacing="0" border="0" width="100%" align="right">
    <
tr align="right">
        <
td>
            <
div class="smallfont">
                
$vbphrase[toplist_select_category]: 
                <
select name="cid" onchange="this.form.submit();">
                    <
option selected="selected" value="">$vbphrase[toplist_view_all_sites]</option>
                    <
optgroup label="$vbphrase[toplist_categories]">
                        
$cat_list
                    
</optgroup>
                </
select
                <
input type="submit" class="button" value="$vbphrase[toplist_go]/>
            </
div>
        </
td>
    </
tr>
    </
table>
    </
form>
    <
br /><br />
    <if 
condition="$vboptions['toplist_show_random_sites'] == 1">
        <
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
        <
tr align="center">
            <
td class="tcat" colspan="7">{$vbphrase['toplist_random_site']}</td>
        </
tr>
        <
tr align="center">
            <
td class="thead" width="20">$vbphrase[toplist_rank]</td>
            <
td class="thead">$vbphrase[toplist_site_name_and_description]</td>
            <
td class="thead" width="50">$vbphrase[toplist_in]</td>
            <
td class="thead" width="50">$vbphrase[toplist_out]</td>
            <
td class="thead" width="50">$vbphrase[toplist_views]</td>
            <
td class="thead" width="90">$vbphrase[toplist_rating]</td>
        </
tr>
        <if 
condition="$randchk >= 1 OR $num_rows >= 1">
            <
tr align="center">
                <
td class="alt2">$rand_rank</td>
                <
td class="alt1"><a href="$vboptions[bburl]/out.php?id=$randsite[id]target="_BLANK">$randsite[name]</a><br />$randsite[description]<br />
                <if 
condition="$vboptions['toplist_show_user_banners'] == 1 AND $randsite['imagecode'] != ''">
                    <
br /><a href="$vboptions[bburl]/out.php?id=$randsite[id]target="_BLANK"><img src="$vboptions[bburl]/toplist_image.php?do=view&amp;id=$randsite[id]border="0" alt="" /></a>
                </if>
                </
td>
                <
td class="alt2" width="50">$randsite[in]</td>
                <
td class="alt1" width="50">$randsite[out]</td>
                <
td class="alt2" width="50">$randsite[views]</td>
                <
td class="alt1" width="90">
                    <if 
condition="$rating == 0">
                        
$vbphrase[toplist_not_rated]
                    <else />
                        <
img src="$vboptions[bburl]/images/rating/toplist_rating_$rating.gif" alt="" />
                        <
br />
                        
$randsite[votes
                        <if 
condition="$randsite['votes'] == 1">
                            
$vbphrase[toplist_vote]
                        <else />
                            
$vbphrase[toplist_votes]
                        </if>
                    </if>
                    <if 
condition="!$show['guest']">
                        <
br />
                        <
a href="#" onclick="javascript:window.open('$vboptions[bburl]/toplist.php?do=rate&amp;id=$randsite[id]','rate_site','menubar=0,resizable=1,width=$vboptions[toplist_popup_width],height=$vboptions[toplist_popup_height]');return false;">$vbphrase[toplist_rate_site]</a>
                    </if>
                </
td>
            </
tr>
        <else />
            <
tr align="center">
                <
td class="alt1" colspan="7">$vbphrase[toplist_none]</td>
            </
tr>
        </if>

        <
tr align="center">
            <
td class="thead" colspan="7"><div class="smallfont">&nbsp;</div></td>
        </
tr>
        </
table>
        <
br />
    </if>
</if>

<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
tr align="center">
    <
td class="tcat" colspan="7">{$vboptions[bbtitle]} {$vbphrase['toplist']}</td>
</
tr>
<
tr align="center">
    <if 
condition="$cat != 1">
        <
td class="thead" width="20">$vbphrase[toplist_rank]</td>
    </if>
    <
td class="thead">$vbphrase[toplist_site_name_and_description]</td>
    <
td class="thead" width="50">$vbphrase[toplist_in]</td>
    <
td class="thead" width="50">$vbphrase[toplist_out]</td>
    <
td class="thead" width="50">$vbphrase[toplist_views]</td>
    <
td class="thead" width="90">$vbphrase[toplist_rating]</td>
</
tr>
$html
<tr align="center">
    <
td class="thead" colspan="7">
        <
div class="smallfont">
            <if 
condition="$vboptions['toplist_enabled'] == 1 AND $permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['canaddsites']">
                <
a href="$vboptions[bburl]/add_site.php">$vbphrase[toplist_add_site]</a>
            <else />
                &
nbsp;
            </if>
        </
div>
    </
td>
</
tr>
</
table>
<
br />
<
table cellpadding="0" cellspacing="0" border="0" width="100%">
<
tr align="$stylevar[right]">
    <
td>$pagenav</td>
</
tr>
</
table>
<
br />
<
center>$last_reset</center>

$footer
</body>
</
html

Toplist_1:
PHP Code:

<tr align="center">
    <if 
condition="$cat != 1">
        <
td class="alt2">$rank</td>
    </if>
    <
td class="alt1"><a href="$vboptions[bburl]/out.php?id=$sr[id]target="_BLANK">$sr[name]</a><br />$sr[description]
    <if 
condition="$vboptions['toplist_show_user_banners'] == 1 AND $sr['imagecode'] != '' AND $sr['in'] >= $vboptions['toplist_number_of_in_hits_until_banner_shows']">
            <
br /><br /><a href="$vboptions[bburl]/out.php?id={$sr[id]}target="_BLANK"><img src="$vboptions[bburl]/toplist_image.php?do=view&amp;id=$sr[id]border="0" alt="" /></a><br />
    </if>
        <if 
condition="$bbuserinfo['username'] == $sr['username']">
            <if 
condition="$permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['caneditsites'] OR $vbulletin->bf_ugp['toplistpermissions']['candeletesites']">
                <
br />
            </if>
        <else />
            <if 
condition="$permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['canadminsites']">
                <
br />
            </if>
        </if>
        <if 
condition="$bbuserinfo['username'] == $sr['username']">
            <if 
condition="$permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['caneditsites']">
                [ <
a href="$vboptions[bburl]/edit_site.php?id=$sr[id]">$vbphrase[toplist_edit_site]</a> ]&nbsp;
            </if>
        <else />
            <if 
condition="$permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['canadminsites']">
                [ <
a href="$vboptions[bburl]/edit_site.php?id=$sr[id]">$vbphrase[toplist_edit_site]</a> ]&nbsp;
            </if>
        </if>
        <if 
condition="$bbuserinfo['username'] == $sr['username']">
            <if 
condition="$permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['candeletesites']">
                [ <
a href="$vboptions[bburl]/delete_site.php?id=$sr[id]"></if>$vbphrase[toplist_delete_site]</a> ]
            </if>
        <else />
            <if 
condition="$permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['canadminsites']">
                [ <
a href="$vboptions[bburl]/delete_site.php?id=$sr[id]"></if>$vbphrase[toplist_delete_site]</a> ]
            </if>
        </if>
        <if 
condition="!is_member_of($bbuserinfo, 1)">
            [ <
a href="#" onclick="javascript:window.open('$vboptions[bburl]/toplist.php?do=report&amp;id=$sr[id]','report','menubar=0,resizable=1,width=320,height=220');return false;">$vbphrase[toplist_report]</a> ]
        </if>
    </
td>
    <
td class="alt2" width="50">$sr[in]</td>
    <
td class="alt1" width="50">$sr[out]</td>
    <
td class="alt2" width="50">$sr[views]</td>
    <
td class="alt1" width="90">
        <if 
condition="$sr['rating_average'] == 0">
            
$vbphrase[toplist_not_rated]
        <else />
            <
img src="$vboptions[bburl]/images/rating/toplist_rating_{$rating_image}.gif" alt="" />
            <
br />
            
$sr[votes
            <if 
condition="$sr['votes'] == 1">
                
$vbphrase[toplist_vote]
            <else />
                
$vbphrase[toplist_votes]
            </if>
        </if>
        <if 
condition="!$show['guest']">
            <
br />
            <
a href="#" onclick="javascript:window.open('$vboptions[bburl]/toplist.php?do=rate&amp;id=$sr[id]','rate_site','menubar=0,resizable=1,width=$vboptions[toplist_popup_width],height=$vboptions[toplist_popup_height]');return false;">$vbphrase[toplist_rate_site]</a>
        </if>
    </
td>
</
tr

Toplist_2:
PHP Code:

<tr align="center">
    <if 
condition="$cat != 1">
        <
td class="alt2">$rank</td>
    </if>
    <
td class="alt1"><a href="$vboptions[bburl]/out.php?id=$sr[id]">$sr[name]</a><br />$sr[description]
    <if 
condition="$vboptions['toplist_show_user_banners'] == 1 AND $sr['imagecode'] != '' AND $sr['in'] >= $vboptions['toplist_number_of_in_hits_until_banner_shows']">
        <
br /><br /><a href="$vboptions[bburl]/out.php?id=$sr[id]target="_BLANK"><img src="$vboptions[bburl]/toplist_image.php?do=view&amp;id=$sr[id]border="0" alt="" /></a><br />
    </if>
        <if 
condition="$bbuserinfo['username'] == $sr['username']">
            <if 
condition="$permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['caneditsites'] OR $vbulletin->bf_ugp['toplistpermissions']['candeletesites']">
                <
br />
            </if>
        <else />
            <if 
condition="$permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['canadminsites']">
                <
br />
            </if>
        </if>
        <if 
condition="$bbuserinfo['username'] == $sr['username']">
            <if 
condition="$permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['caneditsites']">
                [ <
a href="$vboptions[bburl]/edit_site.php?id=$sr[id]">$vbphrase[toplist_edit_site]</a> ]&nbsp;
            </if>
        <else />
            <if 
condition="$permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['canadminsites']">
                [ <
a href="$vboptions[bburl]/edit_site.php?id=$sr[id]">$vbphrase[toplist_edit_site]</a> ]&nbsp;
            </if>
        </if>
        <if 
condition="$bbuserinfo['username'] == $sr['username']">
            <if 
condition="$permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['candeletesites']">
                [ <
a href="$vboptions[bburl]/delete_site.php?id=$sr[id]">$vbphrase[toplist_delete_site]</a> ]
            </if>
        <else />
            <if 
condition="$permissions['toplistpermissions'] & $vbulletin->bf_ugp['toplistpermissions']['canadminsites']">
                [ <
a href="$vboptions[bburl]/delete_site.php?id=$sr[id]">$vbphrase[toplist_delete_site]</a> ]
            </if>
        </if>
    </
td>
    <
td class="alt2" width="50">$sr[in]</td>
    <
td class="alt1" width="50">$sr[out]</td>
    <
td class="alt2" width="50">$sr[views]</td>
    <
td class="alt1" width="90">
        <if 
condition="$sr['rating_average'] == 0">
            
$vbphrase[toplist_not_rated]
        <else />
            <
img src="$vboptions[bburl]/images/rating/toplist_rating_{$rating_image}.gif" alt="" />
            <
br />
            
$sr[votes
            <if 
condition="$sr['votes'] == 1">
                
$vbphrase[toplist_vote]
            <else />
                
$vbphrase[toplist_votes]
            </if>
        </if>
        <if 
condition="!$show['guest']">
            <
br />
            <
a href="#" onclick="javascript:window.open('$vboptions[bburl]/toplist.php?do=rate&amp;id=$sr[id]','rate_site','menubar=0,resizable=1,width=$vboptions[toplist_popup_width],height=$vboptions[toplist_popup_height]');return false;">$vbphrase[toplist_rate_site]</a>
        </if>
    </
td>
</
tr

If you decide to go back to the old layout, simply revert those templates, and the old layout will be restored. I will have a setting in the next version to switch between the 2 layouts, so that will not be necessary in the next version.

Derek

This helps a ton! :)
I bet alot of people could use this


All times are GMT. The time now is 04:55 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.03456 seconds
  • Memory Usage 2,413KB
  • 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
  • (2)bbcode_html_printable
  • (8)bbcode_php_printable
  • (24)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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