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)
-   -   My Best Threads (https://vborg.vbsupport.ru/showthread.php?t=108208)

Developer 02-16-2006 10:00 PM

My Best Threads
 
My Best Threads
v.1.2.7
Description::.
This adds to ur members a feature allow to them to choose thy best thread(s) via thread tools, shows in thier profiles
[Hack Features::.
1-easy yo install
2-Controlable by users
3-easy to add/remove threads
4-table in users profile shows
4.1-Thread title
4.2-Thread date
4.3-Thread forum
4.4-last poster
4.5-last post time
4.6-Views
4.7-replies
5-Users that doesn't have permission to view threads from restricted forums can't view them
[See Screen Shots]
PlannedFeatures::.
N/A

User Controllable
From Thread Tools ==> Add Thread To My best Threads OR Remove Thread from My best Threads.]

Installation::.
1-Import The Product.
3-Edit Template SHOWTHREAD
Find:
Code:

<tr>
                <td class="thead">$vbphrase[thread_tools]<a name="goto_threadtools"></a></td>
        </tr>

Add Below it
Code:

<if condition="$thread['postuserid'] == $bbuserinfo['userid']">
        <tr>
                <td class="vbmenu_option">        <if condition="in_array($thread['threadid'], $mybestthread)"><a href="showthread.php?$session[sessionurl]do=removemybest&amp;t=$threadid">$vbphrase[mybest_remove]</a><else /><a href="showthread.php?$session[sessionurl]do=addmybest&amp;t=$threadid">$vbphrase[mybest_add]</a></if></td>
        </tr>
    </if>

History::.
0.0.1 On 17. Feb 2006 Beta Version.
1.0.0 On 20. Feb 2006 Initial Version.[to upgrade:delete user field then import the product again and follow instruction above]
1.0.1 On 22. Mar 2006 Fix Template Edit
1.2.4 On 15. Apr 2006 Fix a slight bug
1.2.6 On 17. Apr 2006 Fix A minor bug & add alternate alt & no threads error
1.2.7 On 21. Apr 2006 Add forum permission for threads

Hack Languages::.
English Only For Now
Details::.
1 plugins, 13 phrases, 0 option, 1 query(reading only not change or add) and another addin a new row in user's table
Donation::.
Feel Free To https://vborg.vbsupport.ru/external/2010/09/1.gif
aT lAsT::.
IF YOu lIkE iT cLIcK INSTALL
vbulletin.orghttps://vborg.vbsupport.ru/

Support Given For Who Clicked Install {ONLY}

The Realist 02-17-2006 12:40 PM

Nice one M8, keep them coming :)

Laters

The Realist 02-17-2006 01:44 PM

My best threads are NOT showing above the footer of my member info?

The code "$mybest" has been added to the memberinfo template but its not showing.

The thread ID's I have added to my info like: 1,2,3,4, and NOT 1, 2, 3, 4,

Any ideas why its not showing up?

Laters

PS,

Also you say to edit the X with the correct ID's, my line 62 and 64 reads:

// START EDIT
################################################## ############
##$mybestdevel = $vbulletin->userinfo['fieldX'];##Field ID####
################################################## ############
##$mybestlimit = XX;##Limit###################################
################################################## ############
// END EDIT

Do I remove the ## infront of the code? or leave it as it is?

Laters

Developer 02-17-2006 02:27 PM

Quote:

Originally Posted by The Realist
My best threads are NOT showing above the footer of my member info?

The code "$mybest" has been added to the memberinfo template but its not showing.

The thread ID's I have added to my info like: 1,2,3,4, and NOT 1, 2, 3, 4,

Any ideas why its not showing up?

Laters

PS,

Also you say to edit the X with the correct ID's, my line 62 and 64 reads:

// START EDIT
################################################## ############
##$mybestdevel = $vbulletin->userinfo['fieldX'];##Field ID####
################################################## ############
##$mybestlimit = XX;##Limit###################################
################################################## ############
// END EDIT

Do I remove the ## infront of the code? or leave it as it is?

Laters

download the zip again and you'll find an updated product
or you just change the code into
// START EDIT
$mybestdevel = $vbulletin->userinfo['fieldX'];
$mybestlimit = XX;
// END EDIT
and in profile feind make it into options: other not into edit profile and sorry for this i was in hurry

bashy 02-17-2006 03:13 PM

Hi m8...only me :)
Another fine idea...have installed but got this error when i went into my profile

Code:

Database error in vBulletin 3.5.3:

Invalid SQL:

    SELECT thread.threadid,
            thread.title AS tht,
            thread.postusername,
            thread.replycount,
            thread.lastposter,
            thread.lastpost,
            thread.dateline,
            user.userid AS lastposterid2,
            thread.views,
            thread.attach,
            forum.title AS fot,
            forum.forumid AS fir
    FROM thread AS thread, forum AS forum, user AS user
    WHERE thread.postuserid = 1
    AND thread.forumid = forum.forumid
    AND thread.threadid IN ()
    AND thread.lastposter = user.username
    LIMIT XX;

MySQL Error  : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')
    AND thread.lastposter = user.username
    LIMIT XX' at line 16
Error Number : 1064
Date        : Friday, February 17th 2006 @ 05:11:02 PM
Script      : http://www.bashys-place.com/forums/member.php?u=1
Referrer    : http://www.bashys-place.com/forums/usercp.php


Developer 02-17-2006 03:24 PM

Open The Product With any Editor on line 61 replace X with your field ID and on line 62 edit XX and replace it with the number of threads You Want To Be showen in member's profile

Developer 02-17-2006 03:30 PM

Put your best 10 threads ids seperated by , eg:1,2,3,4,5 (change 10 With your limit)
note: (change 10 With your limit) this is my comment don't put it in Description

HaMaDa4eVeR 02-17-2006 03:45 PM

great hacks
installed :)

bashy 02-17-2006 04:08 PM

Hi m8

Ok sorted it now...
I needed to change fieldx blah blah blah lol

This is a little how can i say, erm... Well if a member makes a boo boo when inputting there best threads for e.g. 1 10 12 40 and fails to follow the correct guidelines and use the commas this will give a DB error is there not a fail safe that will stop this giving the error?

Also my best thread aint showing lol

kall 02-17-2006 04:16 PM

What would be nice is if the users could tick a box, rather than entering the ids manually.

Many people (especially those on forums using some form of SEO hack) will have no idea what the thread id might be.

Snake 02-17-2006 06:10 PM

Just thank you! :D

bashy 02-17-2006 07:22 PM

Hi m8...
still gettting a DB error, when a members clicks my profile
It dont happen if i click my profile though...

I have added the field no. and amount of best threads to the product.
I have added the code to the memberinfo template.
I have added 1 thread ID in my CP as 194 nothing else....

I have had to tuirn this off again untill a fix is sorted :)

FleaBag 02-17-2006 10:56 PM

This is awesome! :D

AshokForums.com 02-17-2006 11:26 PM

Can this be displayed in his signature?

GamerJunk.net 02-18-2006 01:14 AM

This doesn't work if you have SEO URL's enabled.

Developer 02-18-2006 07:47 AM

mmmmmmmmmm i'll take my hack to beta stage sorry for this

GamerJunk.net 02-18-2006 03:25 PM

Why revert to Beta?

The Realist 02-18-2006 04:22 PM

Because of this and other problems.

Quote:

Originally Posted by RasMasta
This doesn't work if you have SEO URL's enabled.


nasser71 02-18-2006 10:29 PM

Quote:

Originally Posted by kall
What would be nice is if the users could tick a box, rather than entering the ids manually.

Many people (especially those on forums using some form of SEO hack) will have no idea what the thread id might be.


indeed i agree

but anyway nice work m8
thanks

Developer 02-20-2006 01:47 PM

1.0.0 On 20. Feb 2006 Initial Version.[to upgrade:delete user field then import the product again and follow instruction above]
now it's great

The Realist 02-20-2006 02:04 PM

Would just removing the product remove the user field as well?

And the user field is that removed from the database via phpmyadmin?

Quote:

Originally Posted by Developer
1.0.0 On 20. Feb 2006 Initial Version.[to upgrade:delete user field then import the product again and follow instruction above]
now it's great


Developer 02-20-2006 02:07 PM

Quote:

Originally Posted by The Realist
Would just removing the product remove the user field as well?

And the user field is that removed from the database via phpmyadmin?

no, user field is added and removed manually from ACP

The Realist 02-20-2006 02:52 PM

Tried to follow instructions but my templates are not standard VB.

You state:
Quote:

Find:

<else />
<a href="subscription.php?$session[sessionurl]do=addsubscription&amp;t=$threadid">$vbphrase[subscribe_to_this_thread]</a>
</if>
</td>
</tr>
And below it place:
Quote:

<if condition="$thread['postuserid'] == $bbuserinfo['userid'] && $thread['firstpostid'] != $bbuserinfo['userid']">
<tr>
<td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/best.gif" />
<if condition="in_array($thread['threadid'], $mybestthread)">
<a href="showthread.php?$session[sessionurl]do=removemybest&amp;t=$threadid">$vbphrase[mybest_remove]</a>
<else />
<a href="showthread.php?$session[sessionurl]do=addmybest&amp;t=$threadid">$vbphrase[mybest_add]</a>
</if>
</td>
</tr></if>
My templates have this code in them:
Quote:

<else />
<a href="subscription.php?$session[sessionurl]do=addsubscription&amp;t=$threadid">$vbphrase[subscribe_to_this_thread]</a>
</if>
</div>
</if>
<if condition="$show['addpoll']">
<div><img class="inlineimg" src="$stylevar[imgdir_button]/addpoll.gif" alt="$vbphrase[add_a_poll]" vspace="1" /> <a href="poll.php?$session[sessionurl]do=newpoll&amp;t=$threadinfo[threadid]">$vbphrase[add_a_poll_to_this_thread]</a></div>
</if>
</div>
<!-- / thread tools -->
I have tried adding your code below the above and within the code, but the link does not show up?

Any ideas?

Laters

bashy 02-20-2006 03:08 PM

Hi

Im sorry im a little lost...what user field lol

Developer 02-20-2006 03:23 PM

sorry i had something wrong in the product i'll fix it then answer ur questions

Developer 02-20-2006 04:10 PM

fixed you have to download the product again

Developer 02-20-2006 04:11 PM

Quote:

Originally Posted by The Realist
Tried to follow instructions but my templates are not standard VB.

You state:


And below it place:


My templates have this code in them:


I have tried adding your code below the above and within the code, but the link does not show up?

Any ideas?

Laters

add the code below
Code:

<else />
<a href="subscription.php?$session[sessionurl]do=addsubscription&amp;t=$threadid">$vbphrase[subscribe_to_this_thread]</a>
</if>
</div>
</if>


Developer 02-20-2006 04:13 PM

Quote:

Originally Posted by bashy
Hi

Im sorry im a little lost...what user field lol

i mean user profile field :)

OmeR4eVeR 02-20-2006 04:20 PM

thanks developer very nice

emin3m 02-20-2006 05:18 PM

juss wondering every of your plugin is great but you dun use template changes within the xml file
like
PHP Code:

$vbulletin->templatecache['MEMBERINFO']=str_replace('$footer','$mybest
$footer'
,$vbulletin->templatecache['MEMBERINFO']); 

make hook location "parse_template"

Developer 02-20-2006 05:35 PM

Quote:

Originally Posted by emin3m
juss wondering every of your plugin is great but you dun use template changes within the xml file
like
PHP Code:

$vbulletin->templatecache['MEMBERINFO']=str_replace('$footer','$mybest
$footer'
,$vbulletin->templatecache['MEMBERINFO']); 

make hook location "parse_template"

:) but not every one want to put it above the footer

emin3m 02-20-2006 07:13 PM

lol then users can change from plugin!
i was juss suggestin to make it all in juss xml

Hornstar 02-20-2006 07:28 PM

Very nice hack, this may make people more interested in making threads now. I'll intall it and let you know if everything goes good.

bashy 02-20-2006 08:00 PM

I am having issues m8...
I cant see the the image /button in the thread tools menu :(
I have upped the image to my styles buttons dir
theres nothing in the menu thats changed and i have done the edit :(

Hornstar 02-20-2006 08:05 PM

im doing the template edits, but for mine it looks like this

Code:

<a href="subscription.php?$session[sessionurl]do=addsubscription&amp;t=$threadid">$vbphrase[subscribe_to_this_thread]</a>
                                </if>
                        </div>
                </if>

Where as yours ended in
</if>
</td>
</tr>


Where should I add this after
Code:

<if condition="$thread['postuserid'] == $bbuserinfo['userid'] && $thread['firstpostid'] != $bbuserinfo['userid']">
        <tr>
                <td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/best.gif" />
                <if condition="in_array($thread['threadid'], $mybestthread)">
                        <a href="showthread.php?$session[sessionurl]do=removemybest&amp;t=$threadid">$vbphrase[mybest_remove]</a>
                <else />
                        <a href="showthread.php?$session[sessionurl]do=addmybest&amp;t=$threadid">$vbphrase[mybest_add]</a>
                </if>
                </td>
        </tr></if>

?

Developer 02-20-2006 08:11 PM

Quote:

Originally Posted by bashy
I am having issues m8...
I cant see the the image /button in the thread tools menu :(
I have upped the image to my styles buttons dir
theres nothing in the menu thats changed and i have done the edit :(

change
Code:

$stylevar[imgdir_button]/best.gif
to the image location

Developer 02-20-2006 08:13 PM

Quote:

Originally Posted by hornstar1337
im doing the template edits, but for mine it looks like this

Code:

<a href="subscription.php?$session[sessionurl]do=addsubscription&amp;t=$threadid">$vbphrase[subscribe_to_this_thread]</a>
                                </if>
                        </div>
                </if>

Where as yours ended in
</if>
</td>
</tr>


Where should I add this after
Code:

<if condition="$thread['postuserid'] == $bbuserinfo['userid'] && $thread['firstpostid'] != $bbuserinfo['userid']">
        <tr>
                <td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/best.gif" />
                <if condition="in_array($thread['threadid'], $mybestthread)">
                        <a href="showthread.php?$session[sessionurl]do=removemybest&amp;t=$threadid">$vbphrase[mybest_remove]</a>
                <else />
                        <a href="showthread.php?$session[sessionurl]do=addmybest&amp;t=$threadid">$vbphrase[mybest_add]</a>
                </if>
                </td>
        </tr></if>

?

add it after the code you get it
Code:

<a href="subscription.php?$session[sessionurl]do=addsubscription&amp;t=$threadid">$vbphrase[subscribe_to_this_thread]</a>
                                </if>
                        </div>
                </if>


bashy 02-20-2006 08:14 PM

Just check my usercp options and the best threads ID box aint there any more either

bashy 02-20-2006 08:16 PM

Something like this?

Quote:

Originally Posted by Developer
change
Code:

$stylevar[imgdir_button]/forums/images/buttons_mns/best.gif
to the image location


Hornstar 02-20-2006 08:28 PM

Quote:

Originally Posted by Developer
add it after the code you get it
Code:

<a href="subscription.php?$session[sessionurl]do=addsubscription&amp;t=$threadid">$vbphrase[subscribe_to_this_thread]</a>
                                </if>
                        </div>
                </if>



I added it after that, but nothing shows up when I click on "thread tools" for my thread.

Here is what i have




Code:

<!-- thread tools -->
        <div class="smallfont">
                <if condition="!$show['search_engine']">
                        <div><img class="inlineimg" src="$stylevar[imgdir_button]/printer.gif" alt="$vbphrase[show_printable_version]" vspace="1" /> <a href="printthread.php?$session[sessionurl]t=$threadid" accesskey="p" rel="nofollow">$vbphrase[show_printable_version]</a></div>
                        <div><img class="inlineimg" src="$stylevar[imgdir_button]/sendtofriend.gif" alt="$vbphrase[email_this_page]" vspace="1" /> <a href="sendmessage.php?$session[sessionurl]do=sendtofriend&amp;t=$threadid" rel="nofollow">$vbphrase[email_this_page]</a></div>
                </if>
                <if condition="$show['member']">
                        <div><img class="inlineimg" src="$stylevar[imgdir_button]/subscribe.gif" alt="$vbphrase[subscription]" vspace="1" />
                                <if condition="$show['subscribed']">
                                        <a href="subscription.php?$session[sessionurl]do=removesubscription&amp;t=$threadid">$vbphrase[unsubscribe_from_this_thread]</a>
                                <else />
                                        <a href="subscription.php?$session[sessionurl]do=addsubscription&amp;t=$threadid">$vbphrase[subscribe_to_this_thread]</a>
                                </if>
                        </div>
                </if>

<if condition="$thread['postuserid'] == $bbuserinfo['userid'] && $thread['firstpostid'] != $bbuserinfo['userid']">
        <tr>
                <td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/best.gif" />
                <if condition="in_array($thread['threadid'], $mybestthread)">
                        <a href="showthread.php?$session[sessionurl]do=removemybest&amp;t=$threadid">$vbphrase[mybest_remove]</a>
                <else />
                        <a href="showthread.php?$session[sessionurl]do=addmybest&amp;t=$threadid">$vbphrase[mybest_add]</a>
                </if>
                </td>
        </tr></if>

                <if condition="$show['addpoll']">
                        <div><img class="inlineimg" src="$stylevar[imgdir_button]/addpoll.gif" alt="$vbphrase[add_a_poll]" vspace="1" /> <a href="poll.php?$session[sessionurl]do=newpoll&amp;t=$threadinfo[threadid]">$vbphrase[add_a_poll_to_this_thread]</a></div>
                </if>
        </div>
        <!-- / thread tools -->


Can you see anything wrong with this?


All times are GMT. The time now is 08:01 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.01620 seconds
  • Memory Usage 1,871KB
  • 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
  • (13)bbcode_code_printable
  • (2)bbcode_php_printable
  • (15)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
  • (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