Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)

Reply
 
Thread Tools Display Modes
  #101  
Old 03-18-2005, 06:02 PM
zeropaid's Avatar
zeropaid zeropaid is offline
 
Join Date: Nov 2004
Location: San Diego, CA
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So i just wrote a custom workaround so I don't have to have this code in a function.. it is ugly but it works.

I know there is a lot of people using this hack since this thread is so big, but has anyone gotten posts to display on another page? Is there an easy way to get vbulletin to display posts in their format or is the easier way to just grab the postdata from the db and display them myself?
Reply With Quote
  #102  
Old 06-01-2005, 11:18 PM
fly fly is offline
 
Join Date: Oct 2003
Posts: 1,215
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SnitchSeeker
Is there a way to pass the last thread's id from build_new_post? I currently have this: (just a snippet)
PHP Code:
    build_new_post('thread'$foruminfo, array(), 0$post$errors); 

    
$DB_site->query("
            INSERT INTO fp_news_info
                (threadid, avatar, summary)
            VALUES
                (
$threadinfo[threadid], '$news[avatar]', '$news[summary]')
    "
); 
It's not passing the $threadinfo[threadid] variable. I used to insert it directly into the database, but I want a cleaner version. So I modified build_new_post function and added a new variable. So now it would say:
PHP Code:
function build_new_post($type 'thread'$foruminfo$threadinfo$parentid, &$post, &$errors$news
Then an if news exist check, and my previous sql code. However I'm not very sure if this won't bug current posting? Because previously with build_new_post code it'd post, now it just gives a blank page. I need to add the $news variable or it won't work. Regular posting and topic creating is working as far as I can see, but I want to be sure if this is in fact going to work... (did that make sense? )

Did that end up working? If so, can you post your build_new_post function, as I need a way to get the threadid back out of this...
Reply With Quote
  #103  
Old 06-01-2005, 11:36 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You don't have to modify build_new_post().

If you take a close look at its implementation, you will see that $post['threadid'] contains the threadid
$threadinfo can't contain the threadid, as this paramater is call by value instead of call by reference (like $post or $errors)
Reply With Quote
  #104  
Old 06-02-2005, 12:45 PM
fly fly is offline
 
Join Date: Oct 2003
Posts: 1,215
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KirbyDE
You don't have to modify build_new_post().

If you take a close look at its implementation, you will see that $post['threadid'] contains the threadid
$threadinfo can't contain the threadid, as this paramater is call by value instead of call by reference (like $post or $errors)
Sweet! Thanks man. That was it!
Reply With Quote
  #105  
Old 06-02-2005, 09:35 PM
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Location: Orlando, FL, USA
Posts: 1,361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hrm, don't think my subscription is working to this thread, ack!

Anyway, just as an FYI, I'd release this as an official hack if I could find an article or something that would tell me the easiest way to make a menu within the admin panel.
Reply With Quote
  #106  
Old 06-02-2005, 09:36 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What do you mwan with " make a menu within the admin panel."?
Reply With Quote
  #107  
Old 06-02-2005, 10:55 PM
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Location: Orlando, FL, USA
Posts: 1,361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sry, i'm a bit sleep deprived atm

Basically when you look at some hacks, you see that they have added menus to the adminCP / modCP areas. GUIs to make the hack as easy as possible to use. IMHO, someone should make a tutorial on how to do it for newbie vB hackers anyway.

Now that I think of it though, I can't recall WHY I wanted that. IIRC, I had a good reason (someone posted a reason why in this thread), but I'm spacing ATM.

One main reason for the function was for server-side bots/programs to auto-post info (e.g. RSS feeds, whatever). My personal reason for it was similar.

Would you even classify this as a hack? It's more of a collection of vB functions IMHO.
Reply With Quote
  #108  
Old 08-23-2005, 04:00 AM
mtrac's Avatar
mtrac mtrac is offline
 
Join Date: Nov 2004
Location: Edgewater, NJ, USA
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Stupid question, but how do I put carriage returns in? \n doesn't work.
Reply With Quote
  #109  
Old 08-24-2005, 12:03 PM
mtrac's Avatar
mtrac mtrac is offline
 
Join Date: Nov 2004
Location: Edgewater, NJ, USA
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Never mind. I just discovered the distinction between single and double quotes in PHP.
Reply With Quote
  #110  
Old 09-02-2005, 01:33 AM
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Location: Orlando, FL, USA
Posts: 1,361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

kewlness

Yes, I plan to update this when vB 3.5 comes out if it doesn't work
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:46 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05041 seconds
  • Memory Usage 2,258KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete