vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Thread Description v1.2 (https://vborg.vbsupport.ru/showthread.php?t=82799)

eXtremeTim 06-09-2005 10:00 PM

Thread Description v1.2
 
Thread Description Hack v1.2 for vb3.5 beta 1
Support thread: http://www.extremescripts.com/forums...hread.php?t=12

I wil try to do my best to support this hack here but you will get my attention much faster on my site.


What this hack does:
This hack allows your users to add descriptions to their threads that show up on the threadlist. This allows people to read what the thread is about before they enter the thread.

Files To edit: 1
Queries to run: 1
Uses Hooks: Yes
Phrases To Add: 1
Template Edits: 3

Planned:
Add showing of thread description to search results.
Option to turn off thread descriptions on a per forum basis
Option to turn off thread descriptsion showing up on search results.
ajax support for editing thread description from forumdisplay.

If I have missed anything please let me know. I have worked on this off an on today with the power going going out every so often becuase of the storms we have had today.

If you are upgrading use the v1.0 installer and undo the editpost.php file edit. Then just load the new xml file.

There will be a new version that will be a full plugin possible later today. If I get the needed time to make the change. Plus I will release it as a product. :)

If you use this hack please click install.

Kihon Kata 06-10-2005 05:00 AM

clicks install, now where is my support? ;)

jpt62089 06-10-2005 05:01 AM

I dont wanna install this because you have to edit files <_< sry :-/

eXtremeTim 06-10-2005 05:01 AM

Right here tony. ;)

eXtremeTim 06-10-2005 05:02 AM

I tried hard to avoid file edits. The two edits that exist are very small. One is a addition to a query and the other is there becuase there was no plugin in the small space of code where the new code had to go.

jpt62089 06-10-2005 05:04 AM

ok well I am sure you will find a way to do it :) Once you do I will click the install button :)

eXtremeTim 06-10-2005 05:04 AM

there is no way to do it. We cant edit the theadlist query without hacking the file.

Anybody who has downloaded please redownload. I forgot to put the templates edits into the install file.

jpt62089 06-10-2005 05:30 AM

Error....

Quote:

Database error in vBulletin 3.5.0 Beta 1:

Invalid SQL:
UPDATE thread SET
threaddesc = 'vBulletin 3.5 Beta 1!!!'
WHERE threadid = 348;

MySQL Error : Unknown column 'threaddesc' in 'field list'
Error Number : 1054
Date : Friday, June 10th 2005 @ 01:27:12 AM
Script : http://*****/forums/editpost.php
Referrer :
IP Address : 70.57.163.112
Username : JPT62089
Classname : vb_database

C.Birch 06-10-2005 05:34 AM

installed, but it dont show up on the thread list, but the boxs for adding them show up on the new topic and edit screens and the information is saved.

so one of us have missed something to get them to show on the thread list

C.Birch 06-10-2005 05:36 AM

Quote:

Originally Posted by jpt62089
Error....

run the following query from your admin cp:
------

ALTER TABLE `thread` ADD `threaddesc` VARCHAR( 125 ) NOT NULL ;

eXtremeTim 06-10-2005 05:42 AM

Forgot a template edit sorry. Let me update.


anybody who already installed this do the following template edit

---------------
Open threadbit:
---------------
+-----
+Find:
+-----
Code:

<a href="showthread.php?$session[sessionurl]t=$thread[threadid]&amp;page=$thread[totalpages]$thread[highlight]">$vbphrase[last_page]</a></if> )</span></if>
+----------
+Add After:
+----------
Code:

<if condition="$thread['threaddesc']"><span class="smallfont">- $thread[threaddesc]</span></if>
-----------------
Save The Template
-----------------

jpt62089 06-10-2005 05:47 AM

lol thanks timmy!

eXtremeTim 06-10-2005 05:48 AM

Your welcome. :)

C.Birch 06-10-2005 05:51 AM

working fine now :)

any plans for ajax editing of the description?

eXtremeTim 06-10-2005 05:51 AM

I didnt even think of that idea. More work. :)

Once I figure the new ajax system out that is.

jpt62089 06-10-2005 05:54 AM

Good luck Timmy :P

jpt62089 06-10-2005 05:57 AM

quick reply dont work now <_<

jpt62089 06-10-2005 05:58 AM

same with reply... <_<

C.Birch 06-10-2005 06:00 AM

Quote:

Originally Posted by eXtremeTim
I didnt even think of that idea. More work. :)

Once I figure the new ajax system out that is.

hehe no probs :) me going have a nosey around it also has theres a few things it could be used for to me a admin works easyer that i might try and make given free time, like:

editing forum names and description
editing user title and other profilely bits that show in topics

btw and ones free to make them has ill end up more and likely not having time.

eXtremeTim 06-10-2005 06:00 AM

working on it right now.

C.Birch 06-10-2005 06:02 AM

Quote:

Originally Posted by jpt62089
same with reply... <_<

please post any errors so it helps tim with fixing stuff :)

the below is the error i get when trying to reply:

Fatal error: Field threaddesc is not defined in $validfields in class vb_datamanager_post in /includes/class_dm.php on line 484

jpt62089 06-10-2005 06:03 AM

same here.....

Fatal error: Field threaddesc is not defined in $validfields in class vb_datamanager_post in /includes/class_dm.php on line 484

jpt62089 06-10-2005 06:09 AM

its something in the XML and not the file mods....

eXtremeTim 06-10-2005 06:10 AM

Heres the fix

in plugin titled

Thread Description: Save Description

Replaced the code with the following
PHP Code:

if ($type == 'thread') {
$post['threaddesc'] = htmlspecialchars_uni($post['threaddesc']);
$dataman->set('threaddesc'$post['threaddesc']);


I am updating the xml file right now.

jpt62089 06-10-2005 06:20 AM

works fine now :D thanks dude

C.Birch 06-10-2005 06:22 AM

that works fine now tim :)

eXtremeTim 06-10-2005 06:26 AM

Your both welcome. :)

Logikos 06-10-2005 08:25 AM

Tim is right, i tried mutiable ways to get this down to just one file edit. But not every hack can be "file-editless". Though he did save a whole lot of file editing using the hooks system. Nice work man!

/me clicks install!

eXtremeTim 06-10-2005 03:20 PM

Thank you.

If their was a way to get this down to one or no file edits I would have. I also believe I have noticed that I have an extra plugin snapped into this. I have disabled the one on my site right now to notice if I see any problems anywhere if not I will post the changes here.

cmiller1014 06-10-2005 07:42 PM

I thought the whole point was to avoid file edits? I wont be installing any hacks that have file edits. Is the plugin system crummy or what is the problem?

Logikos 06-10-2005 08:06 PM

Quote:

Originally Posted by cmiller1014
I thought the whole point was to avoid file edits? I wont be installing any hacks that have file edits. Is the plugin system crummy or what is the problem?

Cmiller1014. You can't avoid all file edits, but you can minimize them alot. And sometimes, hacking a file is much better then adding a hook. Telling someone your not going to install there hack because they have to edit files is just rude. We work hard to give you guys these hacks, hours, and days, are spent out of our regular lifes to give you a hack and support.

Jelsoft deigned this system to minimize the amount of file edits to mak upgrading easy. This hack would normaly take 8-10 diffrent line edits on 4 files. To minimize them to just 2 small file edits is great. And would only take a person a mintute to upgrade.

cmiller1014 06-10-2005 08:17 PM

And here I thought the entire point of the hooks system was so that we could get friggin support for vbulletin and still have hacks. If I edit files, there is no support.

I wasnt trying to be rude to the person who creates hacks, I just wanted the truth about the hook system, and apparently it is useless.

eXtremeTim 06-10-2005 08:23 PM

I put in requests for additional hooks so hopefully I see the needed stuff in a later version and can remove all file edits later on. :)

cmiller1014 06-10-2005 08:25 PM

eXtremeTim,

Thanks for being on top of all of this so early on. I am relieved to know that people are getting involved and ultimately helping to make vbulletin better for all of us.

Thanks again

playboy 06-11-2005 12:13 PM

Is there a way to make the description appear below the thread title? :)

Logikos 06-11-2005 12:18 PM

Quote:

Originally Posted by playboy
Is there a way to make the description appear below the thread title? :)

It depends on how you edit your template. Instead of

HTML Code:

<if condition="$thread['threaddesc']"><span class="smallfont">- $thread[threaddesc]</span></if>
You can use
HTML Code:

<if condition="$thread['threaddesc']"><div class="smallfont">- $thread[threaddesc]</div></if>
But then your'll need to find an area for the Thread Starter as the way above it will make it look like this:

Thread Title Will Be Here
Thread description will be here
Thread Starter

And you might not want 2 rows like that. If not just let me know how you want it and i'll tell you what you can do.

playboy 06-11-2005 12:27 PM

No I like that with the three columns, thank you so much! *adds to rep*
-EDIT-
Ooh, guess this forum doesnt use the rep thing. :disappointed:

Logikos 06-11-2005 12:33 PM

lol no prob

eXtremeTim 06-11-2005 10:13 PM

I have quite a few other things planned for 3.5 that I would love to get out the door in the next few days.

C.Birch 06-11-2005 11:12 PM

oh do tell tim what they are :p


All times are GMT. The time now is 04:48 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.01357 seconds
  • Memory Usage 1,819KB
  • 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_code_printable
  • (2)bbcode_html_printable
  • (1)bbcode_php_printable
  • (6)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