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)
-   -   Simple newsportal / thread overview to add to your board... (https://vborg.vbsupport.ru/showthread.php?t=38334)

dgmayor 01-07-2003 05:21 PM

Well, I don't allow users to select styles on my board. Each category ties into a site with its own layout, thus each category has its own layout that blends it into the site.

www.lmalla.com and click on the Everquest logo for an example (It's the only one I have public atm). Click on forums and you'll see what I mean. When you click on forums, you're looking at a category under forumdisplay, not forumhome.

Also the news on that page is with your hack, though I have the style hardcoded in the templates atm.

KuraFire 01-07-2003 10:28 PM

hmkay, well, it's quite easy to get a page to use a different style.

1) install freddie's User's Style in Post hack;
2) set the variable $changestyle with a styleid of choice _before_ including global.php in the file :)

you can pass the variable through the URL also...

So then you can send people from each category to see it in that cat's style. But note that each of them will still see the exact same _content_, just not in the same style :)

ForKmaN 04-13-2003 01:44 PM

Does this work for 2.3.0?

Coz I cant find this in newthread.php:
PHP Code:

'1')"); 


KuraFire 04-14-2003 09:05 AM

Actually, you can do it without the newthread.php modification and the mysql database modification. Instead, you can use this hack WITHOUT MODIFYING ANYTHING to your site. Just open newsportal.php from the hack, and use this query at the start:

PHP Code:

SELECT thread.threadid as tidthread.title as ttitle
thread.replycount as treplythread.postusername as user
thread.postuserid as useridthread.dateline as dateline
post.pagetext as pagetextMIN(p.postid) as postid 
FROM thread 
LEFT JOIN post USING 
(threadid
WHERE forumid=$newsforum 
GROUP BY thread
.threadid 
ORDER BY thread
.threadid DESC 
LIMIT $newslimit 

That should work fine, and you don't have to modify any files or your database anymore, with that query. :)

Robink 04-21-2003 10:52 AM

^What you posted is another bugfix? Or it fixes the same bug? Or is it not related to the random post bug?

Or am I confused! ;)

Sharg 04-21-2003 07:41 PM

Quote:

04-14-03 at 10:05 AM KuraFire said this in Post #84
Actually, you can do it without the newthread.php modification and the mysql database modification. Instead, you can use this hack WITHOUT MODIFYING ANYTHING to your site. Just open newsportal.php from the hack, and use this query at the start:

PHP Code:

SELECT thread.threadid as tidthread.title as ttitle
thread.replycount as treplythread.postusername as user
thread.postuserid as useridthread.dateline as dateline
post.pagetext as pagetextMIN(p.postid) as postid 
FROM thread 
LEFT JOIN post USING 
(threadid
WHERE forumid=$newsforum 
GROUP BY thread
.threadid 
ORDER BY thread
.threadid DESC 
LIMIT $newslimit 

That should work fine, and you don't have to modify any files or your database anymore, with that query. :)

Hello, what do you mean exactly when you say to run this query at the start of the file ? Should we siply copy past this, and where ?

Thanks in advance,
Shart

Robink 04-22-2003 07:40 AM

I think he means we replace the existing query :s

KuraFire 04-22-2003 01:14 PM

Yeah, there's a query VERY much like that one at the start of newsportal.php, just replace it with the one you see above :)

Robink 04-22-2003 06:51 PM

What will this new query do? Fix the bug?

KuraFire 04-22-2003 07:05 PM

Yes.

Robink 04-24-2003 07:09 AM

You mean the bug which is mentioned on the first page with a 3-page long solution to resolve it?

KuraFire 04-24-2003 08:13 AM

Yes.

Robink 04-25-2003 03:13 PM

Greatr :D :D

(PS: Add it on the first page too :))

KuraFire 04-25-2003 03:51 PM

First post updated :)

Robink 04-25-2003 04:10 PM

Thanks you kind Sir.

I have been postponing the release of this for days becuase the hack-removal looked scary ;)

KuraFire 04-25-2003 04:17 PM

*grins* :)

Robink 04-25-2003 04:45 PM

Quote:

UPDATE PROCEDURE / BUG FIX:
Open newsportal.php from the attached zip-file, and use this query at the start (instead of the one that you can already find there):

PHP Code:

SELECT thread.threadid as tidthread.title as ttitle
thread.replycount as treplythread.postusername as user
thread.postuserid as useridthread.dateline as dateline
post.pagetext as pagetextMIN(p.postid) as postid 
FROM thread 
LEFT JOIN post USING 
(threadid
WHERE forumid=$newsforum 
GROUP BY thread
.threadid 
ORDER BY thread
.threadid DESC 
LIMIT $newslimit 


First I got a DB error, saying no such table called 'p'.
I changed p to post, then it works, but the error is still there. :(
:cry: :cry: :cry: :cry:

KuraFire 04-25-2003 04:48 PM

oh, my bad..
*fixes*


see the first post, the fix is: make it MIN(post.postid) instead of MIN(p.postid) :)

Robink 04-25-2003 05:10 PM

Somehow, after changing that, the error remains....

Odd... *goes to kill himself*

Robink 04-25-2003 05:12 PM

I mean the random post bug

ForKmaN 04-27-2003 09:19 AM

just out of curiosity, this wouldnt have made my forums delete threads when i go to close them would it?

KuraFire 04-27-2003 06:31 PM

Nope, it can't delete anything from your board.

Robink, that's .... very odd :)

Robink 04-28-2003 09:36 AM

Darn...

Well, I used the old solution anyway...
By using isfirst='Y' and stuff.

And it works great :D

KuraFire 04-28-2003 12:53 PM

*sighs*

mysql--

stupid, stupid mysql! :(

*goes fix newsportal.php to use entirely new approach*

ForKmaN 04-28-2003 01:28 PM

:/

you can do it! :D

KuraFire 04-28-2003 01:39 PM

Just did it!

^_^

</lame nike pun>

Anyhoo, see the first post, I released version 2 of the Newsportal hack, the new .php file is in the (new) attachment in the first post of this thread, you can just overwrite your online newsportal.php with that one (mind you, you'll have to check the variables at the start of the file for your personal forum id settings etc.

*sends out update*

Genocide 05-03-2003 09:06 PM

Invalid SQL: SELECT pagetext,postid FROM post WHERE postid IN () ORDER BY postid DESC
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 ') ORDER BY postid DESC' at line 1

mysql error number: 1064

I got this message when i went to it.... so I know its somthing to do with running querys... but how and what querys?

Genocide 05-03-2003 09:31 PM

what are the two querys every keeps saying Im must run.
I have sombody on the side ready to run them so just post
what querys I must run. Ive uploaded my newsportal to the
server and Ive added the templets in the zip file... but I havent
ran any querys because I SEE NONE. but I see people in this
thread saying they ran querys and it works great. Sombody HELP!

KuraFire 05-04-2003 01:09 PM

Genocide, those queries are old and you no longer need to run them. So forget about all that.

You're getting an error because you've selected a Newsforum id which has no threads yet, that's why it can't find any post id's.

Robink 05-04-2003 02:47 PM

Okay, now for some reason, on the last active threads thing, people are able to see my private forums!!

This isnt supposed to happen, right???

Robink 05-04-2003 02:53 PM

Ofcourse, when they click on it they get a no-permission page, since the thread is in my moderator foum.

Robink 05-04-2003 04:01 PM

Ok, sorry for the triple post, but I can give you a more detailed idea of the problem now.

I made a test account and changed its usergroup to check what happens.
I have 3 private forums, One for moderators, one for supermoderators and one for the admins.

Now, when my test account is a Registered User, in the active threads thing, he can see threads from the Mod Forum, but not from Super Mod forum or the admin Forum. When I click on the thread, it gives me the no permission screen.

When he is a moderator, he can see Mod forum titles, and read them, but cannot see threads of the supermod or Admin Forum.

When I am super mod, I can see supermod threads but not admin threads.
and when I am admin, I can see everything ....

So, now do you have any idea what the problem is?
If you want a demo go here: www.anime-fanatics.com
And there should be an active thread somewhere called "Mods please read", if you click you'll get a no perms screen.

The rest of my forums can be read by unregistered users :)

KuraFire 05-04-2003 04:11 PM

do you use hostmasks or usergroups for making those forums private?

KuraFire 05-04-2003 04:13 PM

err, ignore the previous post, that was made before you made your 3rd one :)

erm... I have no idea, it works fine everywhere else... and the permissions section was supplied by PPN, so.... I dunno what goes wrong there, sorry :(

Robink 05-04-2003 04:16 PM

Ok ... :(

Thanks for the really really prompt reply !!! :D :D

OK, I realised since the problem is only with the one moderator forum being visible, can I edit the query in some way so that the mod forum with forumid = x, is visible only if usergroup id is either 5,6,7.

Or, is there any way to simply exclude teh modertor forum from the thread lists?

Thanks anyway :)

KuraFire 05-04-2003 04:36 PM

yeah, give me the forum id of that particular forum and I'll see what I can do tomorrow from work. I can't really do much right now. Kay? :)

Robink 05-04-2003 05:06 PM

Yeah... thanks...
the forumid is 39 ....

thanks a lot :-)

Or maybe I should make a new thread and ask other people??

Tigga 05-04-2003 08:38 PM

Double check that your forum permissions are set correctly for those forums and that users not in your admin or mod groups don't have permission to view threads in those forums. Also be sure that "Use custom settings" at the top of the forum permissions page is checked (that seems to be a very common thing that is overlooked. ;))

KuraFire 05-05-2003 08:08 AM

Hmm, Robink, lemme know if Tigga's tips worked or not, kay? :)

Stu 05-05-2003 01:31 PM

maybe a stupid comment, but I thought I had this problem too, but it was just that I hadn't refreshed my browser!!!!


All times are GMT. The time now is 11:07 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.01413 seconds
  • Memory Usage 1,828KB
  • 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
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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