vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Attachments in calendar events (https://vborg.vbsupport.ru/showthread.php?t=62264)

Lee Wilde 05-25-2004 08:00 AM

Thank you! Installed in minutes without a single hitch. Very impressed.

Lee Wilde 05-25-2004 08:11 AM

Kentaurus, I'm surprised more people haven't installed this hack. I myself came across it a couple of weeks ago but didn't realise exactly what it was, so I didn't bother installing it at the time.

Perhaps if the name of the hack was "Images in Calendar Event".....or...."Add Images to Calendar Events"?

moonclamp 05-25-2004 06:26 PM

Worked first time, I can see this being very useful

*clicks install*

nexialys 08-12-2004 12:25 PM

!ping ...

is there an update to come for 3.0.3+ ???
there is not much to change, maybe just the attachement.php file to verify

spence2 08-13-2004 03:59 PM

So, this will not work in 3.03 "as is"?

D|ver 09-10-2004 03:26 PM

now i installed this. a really great hack :D

i also don't understand why just a few people installed it. this is really a great addon

but i have a little problem:
holidays are shown with all attachments of the whole forum...

anybody got the same problem?

Mattius 09-22-2004 02:21 AM

Towards the end of the instruction file it says to modify this part in attachments.php

Quote:

-------------------------------------------------------------------
search for this code:
-------------------------------------------------------------------

$postid = verify_id('post', $attachmentinfo['postid']);

-------------------------------------------------------------------
replace it with:
-------------------------------------------------------------------

if (!$attachmentinfo['calendar']) {
$postid = verify_id('post', $attachmentinfo['postid']);

-------------------------------------------------------------------
search for this code:
-------------------------------------------------------------------

verify_forum_password($foruminfo['forumid'], $foruminfo['password']);

------------------------------------------------------------------
replace it with:
-------------------------------------------------------------------

verify_forum_password($foruminfo['forumid'], $foruminfo['password']);
}
Im using 3.0.3 btw. Now the modification of the query just above it is there and can be modified ok, but i cant find this code for the life of me.

Looked in both a fresh attachments.php
and my hacked version and.....nudda.

Please help

Mattius 09-22-2004 06:56 AM

OK strange i got the attachment in calendars to work now, but not pm's

theArchitect 09-23-2004 11:21 PM

Quote:

Originally Posted by Mattius
OK strange i got the attachment in calendars to work now, but not pm's

We really should stop meeting like this.

I only just found this hack and given my issues with the missing code in 3.0.3 for the PM hack am wondering if I will have similar problems with this one. Did you have to make any modifications to get this working?

robert_2004 10-02-2004 09:29 AM

here's the first part fixed for forum/attachment.php

PHP Code:


// attachments for event calendar mod - START
/*
if (!$attachmentinfo = $DB_site->query_first("
    SELECT filename, attachment.postid, attachment.userid, attachmentid,
        " . iif($thumb, 'thumbnail AS filedata, thumbnail_dateline AS dateline, thumbnail_filesize AS filesize,', 'attachment.dateline, filedata, filesize,') . "
        attachment.visible, mimetype, NOT ISNULL(deletionlog.primaryid) AS isdeleted,
        thread.forumid, forum.password, thread.threadid
    FROM " . TABLE_PREFIX . "attachment AS attachment
    LEFT JOIN " . TABLE_PREFIX . "attachmenttype AS attachmenttype ON(attachmenttype.extension = SUBSTRING_INDEX(attachment.filename, '.', -1))
    LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(attachment.postid = deletionlog.primaryid AND type = 'post')
    LEFT JOIN " . TABLE_PREFIX . "post AS post ON (post.postid = attachment.postid)
    LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (post.threadid = thread.threadid)
    LEFT JOIN " . TABLE_PREFIX . "forum AS forum ON (forum.forumid = thread.forumid)
    " . iif($postid, "WHERE attachment.postid = $postid", "WHERE attachmentid = $attachmentid") . "
"))
*/
if (!$attachmentinfo $DB_site->query_first("
    SELECT filename, attachment.postid, attachment.userid, attachmentid, filesize,
        " 
iif(!$vboptions['attachfile'] AND !$thumb'filedata,') . "
        " 
iif($thumb'thumbnail AS filedata, thumbnail_dateline AS dateline, thumbnail_filesize AS filesize,''attachment.dateline, filedata, filesize,') . "
        attachment.visible, mimetype, NOT ISNULL(deletionlog.primaryid) AS isdeleted, visible, calendar
        thread.forumid, forum.password, thread.threadid
    FROM " 
TABLE_PREFIX "attachment AS attachment
    LEFT JOIN " 
TABLE_PREFIX "attachmenttype AS attachmenttype ON(attachmenttype.extension = SUBSTRING_INDEX(attachment.filename, '.', -1))
    LEFT JOIN " 
TABLE_PREFIX "deletionlog AS deletionlog ON(attachment.postid = deletionlog.primaryid AND type = 'post')
    LEFT JOIN " 
TABLE_PREFIX "post AS post ON (post.postid = attachment.postid)
    LEFT JOIN " 
TABLE_PREFIX "thread AS thread ON (post.threadid = thread.threadid)
    LEFT JOIN " 
TABLE_PREFIX "forum AS forum ON (forum.forumid = thread.forumid)
    " 
iif($postid"WHERE attachment.postid = $postid""WHERE attachmentid = $attachmentid") . "
"
))

// attachments for event calendar mod - END 


i haven't tried it yet, though. i can't get the next steps done myself.


All times are GMT. The time now is 09:32 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.01053 seconds
  • Memory Usage 1,753KB
  • 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_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
  • (10)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