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)
-   -   Tutorial Hack (https://vborg.vbsupport.ru/showthread.php?t=58919)

Areku 12-09-2003 11:29 AM

Quote:

Originally Posted by Socrate
hello:)
I have to replace the file "tutorials.php", and following that, I have this like error:

PHP Code:

Database error in vBulletin 2.3.0:

Invalid SQL
        
SELECT tutid,tutname,tutposted,tutposterid,tutmodded,tutpostername,tutvotes,tutviews
        FROM tutorials
        WHERE tutcat 
'1'
        
ORDER BY tutposted ASC
    
mysql error
Champ 'tutmodded' inconnu dans field list 


As of today I'm still getting the "tutmoded unknown" sql error. Just thought you'd like to know. SQL query adding the table fixed it.

I also had to edit some colors as you seem to pick only the default blues hardcoded instead of being picked from the style config...

Congrats on the hack anyway, up 'n running on 2.3.0 ;)

Btw,

1) how can I allow HTML on the tutorials? It's disabled by default.

2) how can i prevent UNREGISTERED users to read ANY tutorial?

3) What's the result of voting NO on a tutorial?

4) Would it be possible to sort the categories list alphabetically?

5) Is it possible to add the time the tutorial was posted? This is because I use the "Today at, Yesterday at," hack stamp and it shows weird as no time is displayed.


Thanks!

assassingod 12-09-2003 01:45 PM

iceman-x, Areku;
I will add this next version

Anime-Loo, thank you.:)

Areku;
1. https://vborg.vbsupport.ru/showpost....3&postcount=53


But use this as the replacement:
PHP Code:

$tut[tutpagetext] = bbcodeparse2($tut[tutpagetext],1,1,1,1); 

2. As mentioned above, i'll add this next version
3. The ammount of votes go down and indicates if the tutorial is properly written, or if it works etc. Basically and indication of a good tutorial
4. Yes, i'll post this soon
5. I'll consider this in a future version

Areku 12-09-2003 01:53 PM

Thanks for #1.

I'll wait for the other 3 ;)

KUTGW!

dacrownjewlz 12-10-2003 01:50 PM

Great hack ;)

I could not get the tutorials.php script to work until I removed "tutmodded," from one of the queries.

assassingod 12-10-2003 04:23 PM

Quote:

Originally Posted by dacrownjewlz
Great hack ;)

I could not get the tutorials.php script to work until I removed "tutmodded," from one of the queries.

The file should be updated. I'll check it out soon

assassingod 12-12-2003 04:06 PM

Just a note:

I cannot update this hack until I can get my internet connection back from my ISP:)

FleaBag 12-13-2003 04:23 PM

Why did they take it?

assassingod 12-13-2003 05:28 PM

Check my thread in the lounge.:)

Areku 12-13-2003 07:21 PM

Can any1 else at least help me out with the no permissions to read to unregistered/not logged in users? ;)

gmarik 12-14-2003 07:27 AM

The add-on could have a small thumb as well, the random one.

GoTTi 12-14-2003 05:03 PM

very cool hack here...question though...

how do i make it where i dont get the X box for image on the category...i dont want to put a image on the categor...

and also, on viewing of tutorials.php?action=home, can it be made to show how many tutorials there are in each category?

Jannefant 12-15-2003 08:16 PM

Will this hack run under 3.0.0 gamma?

Thanks in advance!

FleaBag 12-16-2003 05:18 PM

Quote:

Originally Posted by Jannefant
Will this hack run under 3.0.0 gamma?

Thanks in advance!

No.

FleaBag 12-16-2003 05:19 PM

Quote:

Originally Posted by Da_GoTTi
very cool hack here...question though...

how do i make it where i dont get the X box for image on the category...i dont want to put a image on the categor...

and also, on viewing of tutorials.php?action=home, can it be made to show how many tutorials there are in each category?

To alter your category view as you requested, replace your tuts_catview template with the following.

Code:

{htmldoctype}
<html>
<head>
<title>$bbtitle - Tutorials > $catname[catname]</title>
$headinclude
</head>
<body>
$header

<!-- breadcrumb -->
<table cellpadding="2" cellspacing="0" border="0" width="{contenttablewidth}" {tableinvisibleextra} align="center">
<tr>
        <td width="100%">
<smallfont><b><a href="index.php?s=$session[sessionhash]">$bbtitle</a> -
        <a href="tutorials.php?action=home">Tutorials</a></b> > <b>$catname[catname]</b></smallfont></td>
</tr>
</table>
<!-- /breadcrumb -->
<normalfont>

<div align="right"><a href="tutorials.php?action=add">Add a tutorial!</a>
</normalfont>
<table cellpadding="0" cellspacing="0" border="0" bgcolor="{tablebordercolor}" width="98%" align="center"><tr><td>
<table cellpadding="4" cellspacing="1" border="0"  width="100%">
<tr id="cat">
<td bgcolor="{categorybackcolor}" nowrap><normalfont color="{categoryfontcolor}"><b>Tutorial Name</b></normalfont></td>
<td bgcolor="{categorybackcolor}"><normalfont color="{categoryfontcolor}"><b>Posted</b></normalfont></td>
<td bgcolor="{categorybackcolor}"><normalfont color="{categoryfontcolor}"><b>By</b></normalfont></td>
<td bgcolor="{categorybackcolor}"><normalfont color="{categoryfontcolor}"><b>Views</b></normalfont></td>
<td bgcolor="{categorybackcolor}"><normalfont color="{categoryfontcolor}"><b>Votes</b></normalfont></td>
</tr>
$tutlisting
</table></td></tr></table>

The layout might be slightly different as I've changed it for my own needs.

At present you can't list the number of tutorials in each category on the main tutorial listing page.

FleaBag 12-16-2003 05:24 PM

Quote:

Originally Posted by Areku
Can any1 else at least help me out with the no permissions to read to unregistered/not logged in users? ;)

I think this should work...

In tutorials.php - After;

PHP Code:

require("./global.php"); 

add...

PHP Code:

if ($bbuserinfo[userid]==0) {
show_nopermission();



iceman-x 12-16-2003 11:05 PM

Thanks for the permissions hack. it work like a charm. :):):)

IKer 12-19-2003 07:20 AM

Idea of addon : Make a counter of tutorial by category between "()" near de category name ;)

FleaBag 12-19-2003 07:49 PM

Quote:

Originally Posted by iceman-x
Thanks for the permissions hack. it work like a charm. :):):)

No problem.

Areku 12-20-2003 03:31 PM

SO cool! Thanks!

Frozen Dreams 12-22-2003 10:42 AM

Any chance that the edit option comes soon? I think this is a great idea, but before I make it public on my board I need that edit feature - otherwhise I can soooo see the staff having to do the edits - or people just reposting the tutorials :s

assassingod 12-23-2003 12:16 PM

Hello all,

When I can get my internet back, version 1.3 will be released with a ton of new features! Ive completed them all so you should get it ASAP.
  • Tutorial Moderation
  • Number of Tutorials for each catagory
  • Cleaner Template code (all the replacements sorted too)
  • Edit Feature
  • Admin Tutorial options
  • More Admin CP options
  • More user and usergroup permissions
  • A mini-rating system based on the built in vote system - see which tutorials are hot and which are not!
:)

IKer 12-23-2003 09:11 PM

Goood Assass! i'm hurry to see 1.3 release ;)

assassingod 12-24-2003 02:27 PM

I also forgot to mention a Search feature

iceman-x 12-25-2003 11:54 PM

Nice, looking forward to it. thanks in advance. :)

chrisvonc 12-30-2003 03:44 PM

Nice. Install went well on my test forum with the exception of the one DB adjustment but was fixed after the fix from post #58. I cant wait for v1.3 and all the improvements.

Thank you assassingod!

Chris

weezer412 01-03-2004 01:30 PM

anyone have any ideas on how to make a user comment system for each one?

assassingod 01-03-2004 01:53 PM

I'll release this as an addon after I released 1.3

weezer412 01-07-2004 10:50 PM

Quote:

Originally Posted by assassingod
I'll release this as an addon after I released 1.3

awesome i have some ideas for the next one :)

1.user comment feature
1a.once someone has posted a comment the person who made the turorial can reply in like the same box rather than making a whole new box for a comment
2.A more in depth voting system(out of 5 or maybe 10?)
3.on the main tuorials home page each should have total turoials in each section

hmmm any other cool ideas

looks like you have most of this covered awesome job

:D


maybe have like for flash tutorials the allowance of adding .swf file for previewing a tutorail and allow then rather to read the whole thing they could upload a .fla for people to freely download..also is there a way toa dd a thing like for php for actionscript that would be tizight

SRozhon 01-09-2004 01:48 PM

I love this hack! I am wondering something though. I use vbportal and I was wondering how I could change newsletter.php (see attachment) so I can add the tutorials links to my newsletter like we can add post links to the newsletter in the admin section???

surfhog 01-09-2004 08:15 PM

I manged to get this finallt working on vb2, it's real great and thanks assassingod I like the modifications you have done :) When will you start working on a version for RC2 do you think? Be nice anyways ;)

thanks

assassingod 01-09-2004 08:20 PM

weezer412;
I'll think about these suggestions

SRozhon;
I am not familiar with vBPortal so I cannot complete that for you

Surfhog;
I am currently working on an Gamma version, however I will be updating the RC2 soon. Sadly I cannot give an exact date for the RC2 version, however, 1.3 for vB3 will be released soon.

weezer412 01-09-2004 09:17 PM

HURRY UP lol i really want this newer version im seriosuly dying for this thing lol

kevinrstruck 01-12-2004 06:02 PM

This looks like an awesome hack. I installed everything, and did my Querries, but I get this error when I try to add a test Tutorial:

Database error in vBulletin 2.3.4:

Invalid SQL:
INSERT INTO tutorials (tutid,tutname,tutpagetext,tutposted,tutmodded,tut cat,tutposterid,tutpostername)
VALUES (NULL,'Simple Monitor Calibration','A simple monitor calibration using a grayscale strip .

I know I did something wrong.

Thoughts?

X-Sector 01-12-2004 09:08 PM

I have this MySQL database error when posting a new tut

Database error in vBulletin 2.3.4:

Invalid SQL:
INSERT INTO tutorials (tutid,tutname,tutpagetext,tutposted,tutmodded,tut cat,tutposterid,tutpostername)
VALUES (NULL,'dfs','sfsf','1073949285','0','','1','Sector ')

mysql error: Unknown column 'tutmodded' in 'field list'

mysql error number: 1054

Date: Monday 12th of January 2004 05:14:45 PM
Script: http://www.xelation.net/forums/forum...php?action=add
Referer:

X-Sector 01-12-2004 09:41 PM

Nvm.. I fixed that.

One more question.. how do you change the colour inside of the tutorials tables?

kevinrstruck 01-12-2004 10:10 PM

X-Sector since we had the same problem, and you fixed yours, mind letting me know what you did to fix it?

X-Sector 01-12-2004 10:26 PM

I ran the query :

ALTER TABLE tutorials ADD tutmodded INT(10)

This should fix your problem ;)

X-Sector 01-13-2004 02:23 PM

so anyway.. how do you change the color inside of the tutorials tables

kevinrstruck 01-13-2004 09:19 PM

Thanks X-Sector, that worked.

MilleniumClock 01-14-2004 11:47 PM

problem i get this when i try to go to a category on my site:

Database error in vBulletin 2.3.4:

Invalid SQL:
SELECT tutid,tutname,tutposted,tutposterid,tutmodded,tutp ostername,tutvotes,tutviews
FROM tutorials
WHERE tutcat = '1'
ORDER BY tutposted ASC

mysql error: Unknown column 'tutmodded' in 'field list'

mysql error number: 1054

Date: Wednesday 14th of January 2004 08:48:16 PM
Script: http://www.clockse.cx/bbs/bbs/tutori...iewcat&catid=1
Referer: http://www.clockse.cx/bbs/tutorials.php


All times are GMT. The time now is 04:13 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.01792 seconds
  • Memory Usage 1,831KB
  • 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
  • (4)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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