Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > Premium Archives > ibProArcade Archive
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Project I'd like to do - Get the latest champs (etc) box onto favorites page Details »»
Project I'd like to do - Get the latest champs (etc) box onto favorites page
Version: , by Mark.B (Senior Member) Mark.B is offline
Developer Last Online: Aug 2023 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 03-17-2012 Last Update: Never Installs: 0
 
No support by the author.

This is something I'd quite like to have a crack at, but looking at the code I can't work out how you;d do it. I have managed to move things about in the arcade code before so I'm not totally clueless, but I just cannot work out how you'd go about this.

Basically, the box that displays latest champs, random games, newest games, etc, that displays on the arcade home page - it does not display on the favorites page, (which is otherwise a very similar page in appearance), and I'd like to try and get it to do so.

I'm not looking for someone to do this for me, but I wondered if anyone who grasps the arcade code might know what I should do.

I can find the code that actually generates the boxes, but what i can't do is work out how I would make that code display on the favourites page.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 03-17-2012, 03:31 PM
Hippy's Avatar
Hippy Hippy is offline
 
Join Date: Dec 2001
Location: USA, New Jersey
Posts: 2,392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I never thought of this but It would take me a while to figure it out .. but if it interests stangger5 he can explain it so you can do it ..he is a master with how this arcade ticks..
I am sure he will see this ..
He has been busy with life and other.

but I will speak to him..

Regards
Hippy
Reply With Quote
  #3  
Old 03-17-2012, 06:15 PM
Mark.B Mark.B is offline
Senior Member
 
Join Date: Feb 2004
Posts: 1,354
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Hippy, appreciate it.

It's just something I'd like to do, and I fancy the challenge of learning that aspect of the (often tricky) ibProarcade code.
Reply With Quote
  #4  
Old 03-17-2012, 09:46 PM
stangger5's Avatar
stangger5 stangger5 is offline
 
Join Date: Jan 2005
Location: Online
Posts: 1,130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Let me see what I can come up with and I`ll let you know..

--------------- Added [DATE]1332024253[/DATE] at [TIME]1332024253[/TIME] ---------------

Ok,,I have it done...

Do you want the Arcade Announcements: to show on My Favorites page ??

You need to edit three files (Skins and mod_favorites) and get info from anther one(arcade)..

Lets start small...

Look at arcade.php file and find this:

PHP Code:
        // Newest Games
                
$DB->query("SELECT g.gid, g.gtitle, g.gname, g.gcat, cat.password, cat.active FROM ibf_games_list AS g, ibf_games_cats AS cat WHERE g.active=1 AND cat.active=1 AND g.gcat=cat.c_id AND trim(password)='' ORDER BY g.added DESC LIMIT ".$this->arcade->settings['games_new']);
                
$firstnew true;
                while(
$newgline $DB->fetch_row()) {
                        if(
$firstnew) {
                                
$firstnew false;
                        } else {
                                
$new_games .= "<br />\n";
                        }

                        
$new_games .= "<img src='arcade/images/{$newgline[gname]}2.gif' alt='' width='20' height='20' /> <a href='".$ibforums->base_url."act=Arcade&amp;do=play&amp;gameid={$newgline['gid']}'>{$newgline['gtitle']}</a> ";
                        }
                
// End Newest Games 
The code above,,you`ll need to change every $this to $main..

Paste that code in the mod_favorites,, right before:
PHP Code:
$this->html .= $main->html->favorites($the_games,$stylecolumns); 
Then add $new_games to the above,,like this:
PHP Code:
$this->html .= $main->html->favorites($the_games,$new_games,$stylecolumns); 
Now go to you skin file and look for:
PHP Code:
function favorites($game_list,$stylecolumns) { 
add $new_games to it..
PHP Code:
function favorites($game_list,$new_games,$stylecolumns) { 
PHP Code:
global $ibforums;
return <<<
EOF 
Add this below that:
PHP Code:
                <div class="tborder">
                        <
table width='100%' border='0' cellspacing='1' cellpadding='4'>
                        <
tr>
                        <
td align="center" width="20%" nowrap="nowrap" class="blockhead">{$ibforums->lang['infobox_newgames']}</td>
                        </
tr>

                        <
tr>
                              <
td class="alt2" align="left" valign="top" style="width: 20%;padding-right:7px;padding-top:5px;padding-bottom:5px;">

                        {
$new_games}

                        </
td>
                        </
tr>
                        </
table>                
</
div
That should get you started..

Reply With Quote
  #5  
Old 03-17-2012, 11:24 PM
Hippy's Avatar
Hippy Hippy is offline
 
Join Date: Dec 2001
Location: USA, New Jersey
Posts: 2,392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Like I said if anyone can do it is the man above..

thanks stangger5 .. was a pretty good idea ...

2 thumbs up
Reply With Quote
  #6  
Old 03-18-2012, 10:20 AM
Mark.B Mark.B is offline
Senior Member
 
Join Date: Feb 2004
Posts: 1,354
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for you great help with this, after quite a bit of trial and error I think it's working:

Attachment 137125

The only thing that doesn't work, is that on my modified arcade's main page I call the vBulletin bbcode parser (to parse smilies in the Latest Comments section).
This gives a php error on the favourites page so I had to comment it out:

PHP Fatal error: Call to a member function query_read_slave() on a non-object in /var/www/vhosts/bowlandcentral.com/httpdocs/testvb/includes/class_bbcode.php on line 258

Not really a major problem, but I'm intrigued as to why it doesn't work.
Reply With Quote
Благодарность от:
Gemma
  #7  
Old 03-18-2012, 12:17 PM
Hippy's Avatar
Hippy Hippy is offline
 
Join Date: Dec 2001
Location: USA, New Jersey
Posts: 2,392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mark.B View Post
Thanks for you great help with this, after quite a bit of trial and error I think it's working:

Attachment 137125

The only thing that doesn't work, is that on my modified arcade's main page I call the vBulletin bbcode parser (to parse smilies in the Latest Comments section).
This gives a php error on the favourites page so I had to comment it out:

PHP Fatal error: Call to a member function query_read_slave() on a non-object in /var/www/vhosts/bowlandcentral.com/httpdocs/testvb/includes/class_bbcode.php on line 258

Not really a major problem, but I'm intrigued as to why it doesn't work.
nice job bud ..I was bord last night and I got the page to display perfect with one issue .. no more favs showed LMAO .. I was tired ..
and was just testing to learn..


I figure something was out of order .. may play later..

as far as the error .. stangger will know best .. I dtill need my morning coffee
Reply With Quote
Благодарность от:
Mark.B
  #8  
Old 03-20-2012, 02:00 AM
stangger5's Avatar
stangger5 stangger5 is offline
 
Join Date: Jan 2005
Location: Online
Posts: 1,130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you move the $lboard query that reads the comments ??
Then put $lboard in the output..
Reply With Quote
  #9  
Old 03-20-2012, 06:59 AM
Mark.B Mark.B is offline
Senior Member
 
Join Date: Feb 2004
Posts: 1,354
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by stangger5 View Post
Did you move the $lboard query that reads the comments ??
Then put $lboard in the output..
Not by the looks of it, as $lboard is not present in mod_favorites.php.

The comments do show up though, just the smilies don't parse.

I shall have a further play around tonight, $lboard appears dozens of times within arcade.php so I need to work out which bit to copy over.
Reply With Quote
Reply


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 04:48 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.08444 seconds
  • Memory Usage 2,337KB
  • Queries Executed 25 (?)
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
  • (7)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (2)post_thanks_box_bit
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)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_postinfo_query
  • fetch_postinfo
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete