vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   V3Arcade Link to Games in News And Events (https://vborg.vbsupport.ru/showthread.php?t=118298)

DjTaz 06-10-2006 10:00 PM

V3Arcade Link to Games in News And Events
 
Someone on my forums asked me for this because when someone beat their score they wanted to be able to click into the game without having to search for it in the games listings , so i did it and may as well share the edits with everyone because its so simple.

--------------------------------------------------
step 1:
Open Arcade.php

find :
Code:

// Add a new news item, since there's a new champion for this game.
                                        $db->query_write("INSERT INTO " . TABLE_PREFIX . "arcade_news (newstext, newstype, datestamp) VALUES ('" . addslashes(construct_phrase($vbphrase['x_is_the_new_champion'], $vbulletin->userinfo['username'], $game['title'])) . "', 'auto', " . TIMENOW . ")");                        }

and change to :
Code:

// Add a new news item, since there's a new champion for this game.
                                        $db->query_write("INSERT INTO " . TABLE_PREFIX . "arcade_news (newstext, newstype, datestamp) VALUES ('" . addslashes(construct_phrase($vbphrase['x_is_the_new_champion'], $vbulletin->userinfo['username'], $game['title'],$game[gameid])) . "', 'auto', " . TIMENOW . ")");
                                }

(this just adds in a $game[gameid] to the database query)

UPLOAD arcade.php

---------------------------------------------------
step 2:

go to language and phrases in the adminCP

find $vbphrase[x_is_the_new_champion]

and change it from :
Code:

{1} is the new {2} champion!
to
Code:

{1} is the new <a href="arcade.php?do=play&gameid={3}">{2}</a> champion!
--------------------------------------------------------


and you should now have a linkable game name in the news and events section of the arcade when the NEXT PERSON wins a game.

Hope that some others use this - it makes life easier

Robru 06-11-2006 11:19 AM

You're my man ! Thank you :)

TheBlackPoet 06-11-2006 04:31 PM

hmmmm

dan35 06-11-2006 07:59 PM

Nice small addon ;)
Thx!

DjTaz 06-12-2006 01:42 PM

Quote:

Originally Posted by TheBlackPoet
hmmmm

Having a problem with this poet ? Or has someone else written something else similar ? (i didnt check around much , i just did it on my own boards and decided to share with others)

I assume no one else has had any issues with this ? (its simple enough)

DjTaz 07-07-2006 08:43 AM

ok , I'll assume everyone else is ok with this so far - just checking up on it.

Polo 07-24-2006 10:20 PM

I dont know why, but I get this on the link: /arcade.php?do=scores&gameid=[ARG:3 UNDEFINED]

Polo 07-24-2006 10:21 PM

Never Mind, I Fix It

Wenchie 07-28-2006 05:15 PM

Very nice, thank you. :)


All times are GMT. The time now is 02:29 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.01041 seconds
  • Memory Usage 1,727KB
  • 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_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete