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 Show 5 Random Games on the Forum Home (https://vborg.vbsupport.ru/showthread.php?t=101982)

xtreme-mobile 02-28-2006 06:41 PM

<a href="http://www.extreme-mobile.com" target="_blank">http://www.extreme-mobile.com</a>

the permissions are set up ok, the blank ones does not link to a game id thats why it is blank i believe

is there a way to edit the coding so i can add the id?

LBSources 02-28-2006 06:46 PM

Quote:

Originally Posted by MioTraGusa
Sorry!!!! ... redownload the attached file again, I Have badly the head some times.
Sorry again...

**Updated with correct images**

good deal.. thanks !

Lenny

MioTraGusa 02-28-2006 07:27 PM

PHP Code:

    $result_randomgames $db->query("SELECT gameid, title, miniimage, stdimage, description, highscore, highscorerid, votepoints, votecount, sessioncount, username, catname, " TABLE_PREFIX "arcade_games.categoryid FROM " TABLE_PREFIX "arcade_games JOIN  " TABLE_PREFIX "user ON " TABLE_PREFIX "arcade_games.highscorerid = " TABLE_PREFIX "user.userid JOIN " TABLE_PREFIX "arcade_categories ON " TABLE_PREFIX "arcade_games.categoryid = " TABLE_PREFIX "arcade_categories.categoryid ORDER BY RAND() LIMIT 5"); 

the query link the game id whith mini image and standart image and the link is http://your.forum.is/arcade.php?do=play&gameid=239

analize the query ...

tests to install more games ... or reinstall the modification .. ufff :paranoid:

Morrus 03-03-2006 12:47 PM

A slight variation I made which I think is a tad cleaner. This is a replacement for the article_randomgame5_alt template.

Use alt1 and alt2 as your two colours in the settings in the AdminCP.

Place the $showrandomgame just below the <!-- end what's going on box --> line in FORUMHOME.

Code:

         
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="341%" align="center">
  <thead>
  <tr>
    <td class="$vboptions[ranstyle1]" colspan="5"> <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_randomtopic')"><img id="collapseimg_forumhome_randomtopic" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_randomtopic].gif" alt="" border="0" /></a>5
      Random Arcade Games (Buy an <a href="http://www.enworld.org/nuttest/estore.php?do=action&itemid=32">Arcade
      Pass</a> from the eStore!)</td>
  </tr>
  </thead> <tbody id="collapseobj_forumhome_randomtopic" style="$vbcollapse[collapseobj_forumhome_randomtopic]">
  <tr>
    <td class="$vboptions[ranstyle2]" width="5%" valign="middle">
      <center><a href="$vboptions[bburl]/arcade.php?$session[sessionurl_q]do=play&gameid=$randomgameid0">
        <img src="$vboptions[arcadeimages]/$randomstimg0" title="$randomdescr0" border=0 width=50 height=50 hspace=2 vspace=1 align=absmiddle>
      </center></a>
      </td>
    <td class="$vboptions[ranstyle2]" width="5%" valign="middle">
      <center><a href="$vboptions[bburl]/arcade.php?$session[sessionurl_q]do=play&gameid=$randomgameid1">
        <img src="$vboptions[arcadeimages]/$randomstimg1" title="$randomdescr1" border=0 width=50 height=50 hspace=2 vspace=1 align=absmiddle>
      </center></a>
      </td>
    <td class="$vboptions[ranstyle2]" width="5%" valign="middle">
      <center><a href="$vboptions[bburl]/arcade.php?$session[sessionurl_q]do=play&gameid=$randomgameid2">
        <img src="$vboptions[arcadeimages]/$randomstimg2" title="$randomdescr2" border=0 width=50 height=50 hspace=2 vspace=1 align=absmiddle>
      </center></a>
      </td>
    <td class="$vboptions[ranstyle2]" width="5%" valign="middle">
      <center><a href="$vboptions[bburl]/arcade.php?$session[sessionurl_q]do=play&gameid=$randomgameid3">
        <img src="$vboptions[arcadeimages]/$randomstimg3" title="$randomdescr3" border=0 width=50 height=50 hspace=2 vspace=1 align=absmiddle>
      </center></a>
      </td>
    <td class="$vboptions[ranstyle2]" width="5%" valign="middle">
      <center><a href="$vboptions[bburl]/arcade.php?$session[sessionurl_q]do=play&gameid=$randomgameid4">
        <img src="$vboptions[arcadeimages]/$randomstimg4" title="$randomdescr4" border=0 width=50 height=50 hspace=2 vspace=1 align=absmiddle>
      </center></a>
      </td>
  </tr>
  <tr>
    <td class="$vboptions[ranstyle2]" width="17%" valign="middle" align="center"><font size=1><a href="$vboptions[bburl]/arcade.php?$session[sessionurl_q]do=play&gameid=$randomgameid0">$randomtitle0</a><br>
      <a href="arcade.php?categoryid=$randomcatid0">$randomcatn0</a> <br>
      <a href="member.php?$session[sessionurl_q]u=$randomhigid3" target="_blank">$randomname0</a><a href="arcade.php?categoryid=$randomcatid0">
      </a> <br>
      <img src="$vboptions[arcadeimages]/rstb$randomrating0.gif" title="$vbphrase[rating5]" border=0 hspace=4 align=absmiddle>
    </td>
    <td class="$vboptions[ranstyle2]" width="17%" valign="middle" align="center"><font size=1><a href="$vboptions[bburl]/arcade.php?$session[sessionurl_q]do=play&gameid=$randomgameid1">$randomtitle1</a><br>
      <a href="arcade.php?categoryid=$randomcatid1">$randomcatn1</a> <br>
      <a href="member.php?$session[sessionurl_q]u=$randomhigid3" target="_blank">$randomname1</a><a href="arcade.php?categoryid=$randomcatid1">
      </a> <br>
      <img src="$vboptions[arcadeimages]/rstb$randomrating1.gif" title="$vbphrase[rating5]" border=0 hspace=4 align=absmiddle>
    </td>
    <td class="$vboptions[ranstyle2]" width="17%" valign="middle" align="center"><font size=1><a href="$vboptions[bburl]/arcade.php?$session[sessionurl_q]do=play&gameid=$randomgameid2">$randomtitle2</a><br>
      <a href="arcade.php?categoryid=$randomcatid2">$randomcatn2<br>
      </a><a href="member.php?$session[sessionurl_q]u=$randomhigid3" target="_blank">$randomname2</a><a href="arcade.php?categoryid=$randomcatid2">
      </a><a href="arcade.php?categoryid=$randomcatid2"> <br>
      <img src="$vboptions[arcadeimages]/rstb$randomrating2.gif" title="$vbphrase[rating5]" border=0 hspace=4 align=absmiddle>
      </a></td>
    <td class="$vboptions[ranstyle2]" width="17%" valign="middle" align="center"><font size=1><a href="$vboptions[bburl]/arcade.php?$session[sessionurl_q]do=play&gameid=$randomgameid3">$randomtitle3</a><br>
      <a href="arcade.php?categoryid=$randomcatid3">$randomcatn3<br>
      </a><a href="member.php?$session[sessionurl_q]u=$randomhigid3" target="_blank">$randomname3</a><a href="arcade.php?categoryid=$randomcatid3">
      <br>
      <img src="$vboptions[arcadeimages]/rstb$randomrating3.gif" title="$vbphrase[rating5]" border=0 hspace=4 align=absmiddle>
      </a></td>
    <td class="$vboptions[ranstyle2]" width="17%" valign="middle" align="center"><font size=1><a href="$vboptions[bburl]/arcade.php?$session[sessionurl_q]do=play&gameid=$randomgameid4">$randomtitle4</a><br>
      <a href="arcade.php?categoryid=$randomcatid4">$randomcatn4</a> <br>
      <a href="member.php?$session[sessionurl_q]u=$randomhigid4" target="_blank">$randomname4<br>
      <img src="$vboptions[arcadeimages]/rstb$randomrating4.gif" title="$vbphrase[rating5]" border=0 hspace=4 align=absmiddle>
      </a></td>
  </tr>
  </tbody>
</table>
<br />


MioTraGusa 03-03-2006 06:03 PM

Interesting variation. Good work.

If you change this piece of code
HTML Code:

        <td class="$vboptions[ranstyle1]" colspan="5"> <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_randomtopic')"><img id="collapseimg_forumhome_randomtopic" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_randomtopic].gif" alt="" border="0" /></a>5
          Random Arcade Games (Buy an <a href="http://www.enworld.org/nuttest/estore.php?do=action&itemid=32">Arcade
          Pass</a> from the eStore!)</td>

to this another,
HTML Code:

        <td class="$vboptions[ranstyle1]" colspan="5"> <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_randomtopic')"><img id="collapseimg_forumhome_randomtopic" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_randomtopic].gif" alt="" border="0" /></a>$vbphrase[arcade_5random]</td>
I can link your personal modification in the first message
:up:

yayvb 03-09-2006 04:46 PM

I noticed since upgrading from the old version that sometimes now my skin is broken because either the game name is too long or the usernames, I'm not sure which is causing the problem. Any way to fix this?

yayvb 03-09-2006 05:03 PM

It looks like if I edit the arcade title names to something shorter, it still breaks sometimes due to longer usernames. For instance I have a user who's name is similar to this: OUTDOORGROWER so even though his name may only be listed once in the random 5 hack, it is long enough to break the skin. If we could make the limit like 10 characters maybe?

yayvb 03-11-2006 05:11 AM

Hi, I keep seeing the skin broken every other refresh it seems, which means my users are too. I hate my users seeing the skin broken, so if there is no way to limit username length, can I just install the old arcade plugin to return it the way it was before? I don't want a broken skin any longer hehe.

MioTraGusa 03-11-2006 10:34 AM

Sorry, forgive me for causing a expect.

Ok, if your like limit to 10 characters alone you have to continue my instructions ...

in the pluggin manager serach the pluggin "Arcade - Show 5 Random Games on the Forum Home" and edit...

Serach the following code:
PHP Code:

$randomhighs0 round($randomhighs0,0); 

Just Above add:
PHP Code:

$xx 10;
$x = ($xx 2);
if ((
strlen($randomname0)) > $xx)
{
$randomname0 substr($randomname00$x)."..."
}
if ((
strlen($randomname1)) > $xx)
{
$randomname1 substr($randomname10$x)."..."
}
if ((
strlen($randomname2)) > $xx)
{
$randomname2 substr($randomname20$x)."..."
}
if ((
strlen($randomname3)) > $xx)
{
$randomname3 substr($randomname30$x)."..."
}
if ((
strlen($randomname4)) > $xx)
{
$randomname4 substr($randomname40$x)."..."


Note: the variable $xx, change the limit of characters ($xx = 10) you can change the value for adapting the aspect in your template.

Sorry again, and test it....

as already I said before... my english is very bad... I expect that be understood.

bye....

yayvb 03-11-2006 08:26 PM

Thank you so much. I think you are one of the best hack creaters here because you update your product and you give the best support ever!! :) Maybe I can have you work on some custom hacks in the future. I just paid someone $800 to do some hacks for me and the guy did everything wrong and keeps getting frustrated that I ask it to be done different. For instance he made it so that when someone pays with paypal they get changed to gold status and get certain features like they can enlarge photos, etc. However if I move someone to gold usergroup it doesn't happen automatically. He did a lot of backgound coding and keeps asking where his bonus is that I said I would send if he did a great job. It's been about 2 months since he started and it's still not complete. Grr :) Oh well, thank you very much. If you need any favors from an english speaker :) hehe, just ask!!


All times are GMT. The time now is 05:24 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.02230 seconds
  • Memory Usage 1,804KB
  • 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_code_printable
  • (2)bbcode_html_printable
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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