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)
-   -   User's Favourite Quote in Postbit... (https://vborg.vbsupport.ru/showthread.php?t=39655)

Chris M 06-08-2002 10:00 PM

User's Favourite Quote in Postbit...
 
This hack will add the User's favourite Quote in the Postbit...

Download the attached file for the Instructions, or see below :

###-=START=-###

Step A)

Create a new User Profile Field (in your Admin CP). For myself, I created a new field with these properties, in order from top to bottom:

"Favourite Quote"
"Enter your Favourite Quote"
Max Input - 250
Field Length - 25
Display Order - 2
No
No
Yes

Step B)

You need to determine the field id of your new field. If you've never before added a custom profile field, this should be 5. When you hover over the "Edit" link when you go to "Modify" in your Custom profile Field section, a link should appear at the bottom left of the page. It will look something like :
Quote:

http://www.yoursite.com/forum/admin/profile.php?s=&modify&fieldid=7
The last number, in this case "7", is the field id.

Step C)

Open the file: admin/functions.php

Find this:

PHP Code:

        if ($post[aim]!="") {
            eval(
"\$post[aimicon] = \"".gettemplate("aim")."\";");
        } else {
            
$post[aim]="";
        } 

And add below :

PHP Code:

            if ($post[field5]) {
                  
$favquote="$post[field5]<br>";
            } else {
                  
$favquote="";
            } 


(Note : You will need to change the number (5) in the $post[field] brackets to the number that you found out in Step B)

Step D)

Edit the postbit template.

You can put $favquote anywhere in the postbit template that you want. Make sure, however, that there is a <br> before it, but not after it.

Step E)

Upload the functions.php file to your admin directory

###-=END=-###

There are 2 Screenshots to show this hack...

Satan

Chris M 06-09-2002 07:05 PM

This is the View from the actual posts...

Satan

Chris M 06-09-2002 07:06 PM

This is the view from your Profile...

Satan

Brad 06-09-2002 07:06 PM

im isntalling this :D

Brad 06-09-2002 07:08 PM

/me clicks install button

i think that was the fasted ive ever installed a hack :alien:

Chris M 06-09-2002 07:09 PM

Cool...

Tell me what you think:)

Satan

Brad 06-09-2002 07:10 PM

ill leave my members to that job, once i get the forum back up tomorrow :p

Chris M 06-09-2002 07:12 PM

Ok:)

If anyone wants to make any suggestions, by all means, go ahead!:)

Satan

KuraFire 06-09-2002 08:19 PM

Dude, you can do this without any file-hacks.

Just put $post[fieldX] (where X is the profile field ID) inside the postbit template and you're set to go...

No file hacks necessary at all.

KuraFire 06-09-2002 08:20 PM

Nice avatar, though ;)


All times are GMT. The time now is 11:18 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.01101 seconds
  • Memory Usage 1,737KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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