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)
-   -   Each Announcement shows as an extra thread in Forumdisplay (https://vborg.vbsupport.ru/showthread.php?t=40604)

WEForums 04-13-2003 07:02 PM

Strangely enough, in the edit "announcement.php" I cannot find most of the "find this" parts. I think I could only find the first one.

I am using 2.3.0...hmm...can't remember if I edited the announcement.php file or not...I don't remember doing it.

Xenon 04-14-2003 03:46 PM

i think announcement.php has changed during the versions, for vb226 it worked.

you have to try to find similar parts in the code and apply the cahnges manually

sraposa 04-30-2003 02:23 PM

exactly what i needed. my first installed hack and it took 15 minutes and worked immediately.

my only technical note is that i installed on 2.3.0 and noticed that there was a minor discrepancy in the instructions for hacking announcements.php:

the hack says to look for:
Code:


$getperms=getpermissions($foruminfo[forumid]);
if (!$getperms[canview]) {
  eval("standarderror(\"".gettemplate("error_nopermission")."\");");
  exit;
}

but my announcements.php showed:
Code:

$getperms=getpermissions($foruminfo[forumid]);
if (!$getperms[canview]) {
  show_nopermission();
}



looks like they cleaned up the code a little -- or maybe this has something to do with the skin i have installed? in any case, i rubbed a couple of brain cells together and simply added the new code below as instructed and it seems fine.

thanks!

-scott

Xenon 04-30-2003 07:59 PM

yeah i know, it was a bugfix
at least i was the one who reported it ;)

i'll update the instructions in the future time ;)

Xenon 05-01-2003 05:59 PM

well ok, have updated the instructions today to fit vb2.3.0 :)

sraposa 05-01-2003 06:46 PM

well, on behalf of future hack installers, i thank you. ;)

on a related note, i just realized today that many of the most popular hacks on this site don't officially support 2.3.0. i wonder why that is? is 2.3.0 that new? i guess it is, in the larger scheme of things. it's just odd that as a new vBulletin user, i come here and see that most of the activity seems to have somewhat died down when you get to the more recent versions of vB.

-s

Xenon 05-01-2003 06:52 PM

well at first, yes vb230 is really new :)

then second, the version number jsut means for which vb version the hack is written, but normally the also work with newer versions :)

you can't force every author to update every hack he releases whenever a new vb version is released ;)

OmaniMan 05-04-2003 09:52 PM

Really Wonderful ....

I was thinking about this hack since my friend wanted to add more than one annoucment as a seperate ...

wish you the best man

GaleForce 05-04-2003 09:56 PM

Awesome hack! I was looking for something just like this :D

jamoss 07-01-2003 02:34 AM

Perfect! Just what I was looking for. Much thanks.

Oblivion Knight 07-01-2003 07:20 AM

I've always said that this should have been default behaviour..
I didn't know someone had released a mod that actually made it do it..!

Just what I was looking for, thanks Xenon :)

msimplay 08-08-2003 02:09 AM

Yep works great on vb2.3 erm ooh no i hacked my forum to bits and now 2.3.1 is out :(

ANT.menmusic 08-19-2003 04:13 AM

not even 10 minutes for this one and boom - worked like a charm. using 2.2.9
:smoke:in'

-ant

Angelus 10-25-2003 10:50 AM

ich habe diesen prima hack mal versucht in mein 2.2.9 einzubauen aber irgendwie geht das nicht so wie es soll.

ich habe in meiner forumdisplay.php einen ganzanderen code :(

siehe:
PHP Code:

if ($announcement=$DB_site->query_first("SELECT announcementid,startdate,title,user.username,user.userid,user.usertitle,user.customtitle
                                         FROM announcement
                                         LEFT JOIN user
                                           ON user.userid=announcement.userid
                                         WHERE startdate<=
$datenow AND enddate>=$datenow
                                           AND 
$forumlist
                                         ORDER BY startdate DESC
                                          LIMIT 1"
)
  and (!isset(
$pagenumber) or $pagenumber<2)) { 

und im board kommt dann ein fehler:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\board\admin\db_mysql.php on line 154

bitte hleft mir ich weis nicht was da schief l?uft?

Xenon 10-26-2003 02:10 PM

einfach diese if condition mit dem teil ersetzen:

PHP Code:

$announcementbit="";
$announcements=$DB_site->query("SELECT announcementid,startdate,title,user.username,user.userid,user.usertitle,user.customtitle
                                         FROM announcement
                                         LEFT JOIN user
                                           ON user.userid=announcement.userid
                                         WHERE startdate<=
$datenow AND enddate>=$datenow
                                           AND 
$forumlist
                                         ORDER BY startdate DESC"
);
while(
$announcement=$DB_site->fetch_array($announcements)) { 

wenn du das fetch_array hernimmst, musst du aufpassen, das nur ein DB_site->query und kein query_first verwendet wird

Angelus 10-27-2003 07:11 PM

ich habe deinen code mal eingebaut, es ist immernoch der gleiche fehler :( wie oben beschrieben, und in meiner forumdisplay.php sehe ich auch nur eine ank?ndigung obwohl ich mehrere eingestellt habe.

Xenon 10-28-2003 06:21 PM

hmm, der teil kanns kaum sein, der stimmt nämlich, vielleicht haste woanders nen fehler reingebracht.

btw. auf vb-g in der hacksektion ist der hack auch drinnen, aber auf deutsch.
vielleicht hat da auch jemand das problem mal gehabt und gelöst (nur so als tip)

desiforums 09-01-2006 10:31 PM

is it wrk for vbulletin 3.5.4
because i can't find
Open forumdisplay.php

find:
if ($announcement=$DB_site->query_first("SELECT announcementid,startdate,title,user.username,user. userid,user.usertitle,user.cus tomtitle
FROM announcement
LEFT JOIN user
ON user.userid=announcement.userid
WHERE startdate<=$datenow AND enddate>=$datenow
AND $forumlist
ORDER BY startdate DESC
LIMIT 1")) {


All times are GMT. The time now is 07:39 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.01068 seconds
  • Memory Usage 1,763KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (18)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