PDA

View Full Version : GenSec's Alternative Layout



Oblivion Knight
10-22-2005, 05:37 AM
This is a port of GenSec's 3.0.x release (here (http://www.vbulletin.org/forum/showthread.php?t=71481)).

This modification changes the layout of your main index page, and makes much better use of the space available.. It has been completely rewritten from scratch (using previous code as guidance), and is fully integrated with the Arcade Settings in the Admin CP. It is also fully phrased for our foreign friends.. :)

All credit to GenSec for the layout design, who has kindly given permission for me to release this.


Compatability: 1.0.5 ONLY
Screenshots attached (outdated, but gives the general idea).. :)

Wachtmeister
10-22-2005, 05:52 AM
Excellent, thank you !!

But i will wait for the first final, before i do the changes ;)

Our Sponsors
 

imported_jaffaman
10-22-2005, 06:06 AM
great work thanks ;-)

imported_glorify
10-24-2005, 01:20 PM
Great work. Seems I am getting this error when I try to rebuild filesizes:


Database error in vBulletin 3.5.0:

Invalid SQL:
UPDATE arcade_games SET filesize='11' WHERE gameid=1;

MySQL Error : Unknown column 'filesize' in 'field list'
Error Number : 1054

Any ideas?

I did do the arcade_admin.php edit

Our Sponsors
 

Oblivion Knight
10-24-2005, 02:47 PM
Did you import the product?

It seems that the install query didn't run for some reason..

Wachtmeister
10-24-2005, 03:41 PM
I dont have a Rebuild Filesizes.... ?

And Opera Browser shows a huge black frame on the right...

Oblivion Knight
10-24-2005, 03:46 PM
I dont have a Rebuild Filesizes.... ?You need to upload the cpnav_v3aaltlayout.xml file to your includes/xml directory.

Wachtmeister
10-24-2005, 03:50 PM
You need to upload the cpnav_v3aaltlayout.xml file to your includes/xml directory.
Oh, of course. Sorry! Thanks!

Following error on rebuilding filesizes:



Database error in vBulletin 3.5.0:

Invalid SQL:
UPDATE vb3_arcade_games SET filesize='11' WHERE gameid=1;

MySQL Error : Unknown column 'filesize' in 'field list'
Error Number : 1054
Date : Monday, October 24th 2005 @ 09:51:15 PM
Script : arcadeadmin.php?do=gamefilesize
Referrer : admincp/index.php?do=nav
IP Address : 85.178.156.1
Username : admin
Classname : vb_database

imported_glorify
10-24-2005, 03:57 PM
Yep imported. Is it a possibility that I deleted the game with gameID 1, but I haven't taken a peek. If that's the case, is there a work around?

Wachtmeister
10-24-2005, 04:09 PM
Imported the fix.zip (where is it now?) and now it works. (Rebuild filesize)

Oblivion Knight
10-24-2005, 04:12 PM
Imported the fix.zip (where is it now?) and now it works. (Rebuild filesize)Sorry, I'm playing around with stuff.. ;)
Since it works, I'll add it to the zip in a minute.

I'll try and do some testing for that layout issue with Opera.

Wachtmeister
11-30-2005, 09:47 AM
Will this be available for v3a version 1.01?

imported_glorify
11-30-2005, 10:41 AM
It works, there is just one edit in arcade.php that is a little different.

Wachtmeister
11-30-2005, 12:28 PM
It works, there is just one edit in arcade.php that is a little different.

Ok. Please don't tell us what is different. I want to guess it ;)

Oblivion Knight
11-30-2005, 01:25 PM
I'll be releasing 1.0.3 later tonight, which also contains a bug fix.. :)

imported_glorify
11-30-2005, 01:33 PM
Ok. Please don't tell us what is different. I want to guess it ;)

Sorry--I am having issues right now and didn't dig for the change. If you don't want to wait, it deals with this portion:

Find:

if (!($permissions['arcadepermissions'] & $vbulletin->bf_ugp['arcadepermissions']['canoverridepermissions']))
{
// Game bitfield check. (Is Active.)
$bitfieldcheck = '(arcade_games.gamepermissions & 1)';
}

$gamebits = '';



Replace it with:

if (!($permissions['arcadepermissions'] & $vbulletin->bf_ugp['arcadepermissions']['canoverridepermissions']))
{
// Game bitfield check. (Is Active.)
$bitfieldcheck = '(arcade_games.gamepermissions & 1)';
}

// Start processing the $gamebits for GenSec's template mod
$gamebits = '<tr>';
$g = 1;
$x = 1;

Now should be:

Find:

if (!($permissions['arcadepermissions'] & $vbulletin->bf_ugp['arcadepermissions']['canoverridepermissions']))
{
// Game bitfield check. (Is Active.)
$bitfieldcheck = '(arcade_games.gamepermissions & 1)';
}

Replace with:

if (!($permissions['arcadepermissions'] & $vbulletin->bf_ugp['arcadepermissions']['canoverridepermissions']))
{
// Game bitfield check. (Is Active.)
$bitfieldcheck = '(arcade_games.gamepermissions & 1)';
}

Find (approx 5 lines down):

$gamebits = '';

Replace with:

// Start processing the $gamebits for GenSec's template mod
$gamebits = '<tr>';
$g = 1;
$x = 1;

Wachtmeister
11-30-2005, 01:48 PM
Sorry--I am having issues right now and didn't dig for the change. AND, the change isn't working on 1.02

Oh no! Not 1.02 today. I have just finished 1.01 with all add-ons :(

imported_glorify
11-30-2005, 01:50 PM
Not too bad--works with 1.02

Oblivion Knight
11-30-2005, 05:38 PM
1.0.3 is unfortunately delayed until I work out a correct fix for the bug that I've discovered..

imported_glorify
11-30-2005, 10:48 PM
Everything works great after that edit but I can't get it to rebuild file sizes again

EvilGum
12-04-2005, 03:17 PM
This should be included as default, nice job.

imported_glorify
12-19-2005, 10:07 PM
Any updates on this? Still having problems with rebuilding file sizes after the upgrade.

Oblivion Knight
12-20-2005, 04:16 AM
I haven't had time to work on fully fixing the issues with this addon.

Nor do I have any idea when I'll find the time.. :(

imported_glorify
12-20-2005, 11:46 PM
No prob--uninstalled for the moment.

Oblivion Knight
12-23-2005, 05:53 PM
1.0.3 is now released, and should fix ALL issues from previous versions.

Most, if not all file and template edits have been changed. Also, the alternative layout (badged as "Brick Mode") now replaces the "Miniature Mode" instead of standard. This allows users to choose between this and the default layout.

Enjoy.! :D

Oblivion Knight
03-13-2006, 06:28 PM
Updated for v3arcade 1.0.5.
Added stats mouseover for highscorer instead of linking to their profile.
Added newly built-in AJAX favorites system.
Moved game ratings to the far right of each game title using float.

Addon is no longer in beta! :)

fry01
03-14-2006, 08:19 AM
Thanks for the great addon Oblivion Knight.

Quick bug i've noticed after installing it today for the first time.

The stars align fine in Internet Explorer, but are to the left in Firefox making them unreadable.

ConqSoft
03-14-2006, 09:28 AM
Thanks for the great addon Oblivion Knight.

Quick bug i've noticed after installing it today for the first time.

The stars align fine in Internet Explorer, but are to the left in Firefox making them unreadable.

Yep, same here. Works great in IE!

Oblivion Knight
03-14-2006, 02:02 PM
Fixed, please download new instructions and replace your arcade_game_bit_slim template.

I've now moved the rating at the top of the other stats, it was all getting too crowded on the fieldset legend, and it seems that it's impossible to achieve the layout I wanted with Opera and Firefox.

bass.exe21
03-14-2006, 02:04 PM
Having problems when the game has a cost and it will say "Cost to Play: 10.00 Points" width="50" height="50" />" right below the game's pic.

ConqSoft
03-14-2006, 02:12 PM
Fixed, please download new instructions and replace your arcade_game_bit_slim template.

I've now moved the rating at the top of the other stats, it was all getting too crowded on the fieldset legend, and it seems that it's impossible to achieve the layout I wanted with Opera and Firefox.
The message still shows yesterday as the last update?

ConqSoft
03-14-2006, 02:19 PM
Found the problem. I was downloading it from the first post here instead of on vBulletin.org.

The rating looks funny in that location IMO. The label way to the left, and the stars to the right (If the rating is less than 5 there's space there.)

I prefer this look, so I changed this:


<strong>$vbphrase[rating]:</strong> <if condition="!$game[rating]"><em>$vbphrase[none]</em><else /><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$game[rating].gif" alt="<phrase 1="$game[votecount]" 2="$game[rating_acc]" />$vbphrase[game_vote_info]</phrase>" border="0" /></if>


To this:


<if condition="!$game[rating]"><br/><else /><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$game[rating].gif" alt="<phrase 1="$game[votecount]" 2="$game[rating_acc]" />$vbphrase[game_vote_info]</phrase>" border="0" /></if>


For my needs, I feel that people know what the stars mean, so no need to label it; and no reason to show "None" if there are no ratings; just leave it off.

Thanks for the great hack!

imported_Gizmo[5h1t3]
03-14-2006, 02:29 PM
Having problems when the game has a cost and it will say "Cost to Play: 10.00 Points" width="50" height="50" />" right below the game's pic.


geting exactly the same here......

Oblivion Knight
03-14-2006, 03:06 PM
Having problems when the game has a cost and it will say "Cost to Play: 10.00 Points" width="50" height="50" />" right below the game's pic.Hmm.. I don't use vbBux, so there could be a potential conflict somewhere - I don't know. Got a URL I can take a look at?



Found the problem. I was downloading it from the first post here instead of on vBulletin.org.Whoops! Sorry, went to grab something to eat and forgot to update the attachment here. Fixed.



The rating looks funny in that location IMO. The label way to the left, and the stars to the right (If the rating is less than 5 there's space there.)

For my needs, I feel that people know what the stars mean, so no need to label it; and no reason to show "None" if there are no ratings; just leave it off.

Thanks for the great hack!Depends on the images used for ratings i guess.? It looked fine to me on my style..

I added the "None" part to make all fieldsets the same height, more for design reasons than anything.

bass.exe21
03-15-2006, 02:56 PM
For people who are using the vbbux arcade integration use the following code for arcade_game_bit_slim:

<td class="$bgclass" width="25%">
<fieldset class="fieldset" style="margin:0px 0px 0px 0px; padding:0px 2px 2px 2px">
<legend><a href="arcade.php?do=play&amp;gameid=$game[gameid]"><strong>$game[title]</strong></a>&nbsp;<if condition="$show['fav']"><img src="$vboptions[arcadeimages]/subfav.gif" align="absmiddle" id="fav_$game[gameid]" class="point" onclick="dofav($game[gameid])" alt="$vbphrase[sub_favorite]" border="0" /><else /><img src="$vboptions[arcadeimages]/addfav.gif" align="absmiddle" id="fav_$game[gameid]" class="point" onclick="dofav($game[gameid])" alt="$vbphrase[add_favorite]" border="0" /></if></legend>
<div style="padding:0px 0px 0px 2px">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="$stylevar[left]" valign="middle" width="60" height="60">
<a href="arcade.php?do=play&amp;gameid=$game[gameid]"><img src="$vboptions[arcadeimages]/$game[stdimage]" style="border:1px dotted; border-color:#90939C" width="50" height="50" /></a>
</td>

<td class="$bgclass" align="$stylevar[right]" valign="top" width="100%" nowrap="nowrap">
<div style="font-size:9px">
<div><strong>$vbphrase[rating]:</strong> <if condition="!$game[rating]"><em>$vbphrase[none]</em><else /><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$game[rating].gif" alt="<phrase 1="$game[votecount]" 2="$game[rating_acc]" />$vbphrase[game_vote_info]</phrase>" border="0" /></if>
<div><strong>$vbphrase[filesize]:</strong> <em>$game[filesize]KB</em></div>
<div><strong>$vbphrase[category]:</strong> <em><a href="arcade.php?categoryid=$game[categoryid]">$game[catname]</a></em></div>
<if condition="!$game[highscorerid]">
<div><strong>Game Cost:</strong> $game[cost]</div>
<div><em><a href="arcade.php?do=play&amp;gameid=$game[gameid]">$vbphrase[play_now]</a></em></div>
<else />
<div><strong>$vbphrase[champion]:</strong> <em><a href="#" onmouseover="show_userinfo(this, 'userpanel', $game[highscorerid])" onmouseout="kill_panel()">$game[username]</a></em></div>
<div><strong>$vbphrase[high_score]:</strong> <em><a href="arcade.php?do=scores&amp;gameid=$game[gameid]">$game[highscore]</a></em></div>
<div><strong>$vbphrase[personalbest]:</strong> <em><if condition="!$game['personalbest']">$vbphrase[none]<else />$game[personalbest]</if></em></div>
<div><strong>Game Cost:</strong> $game[cost]</div>
</if>
</div>
</td>
</tr>
</table>
</div>
</fieldset>
</td>
$nextrow<td class="$bgclass" width="25%">
<fieldset class="fieldset" style="margin:0px 0px 0px 0px; padding:0px 2px 2px 2px">
<legend><a href="arcade.php?do=play&amp;gameid=$game[gameid]"><strong>$game[title]</strong></a>&nbsp;<if condition="$show['fav']"><img src="$vboptions[arcadeimages]/subfav.gif" align="absmiddle" id="fav_$game[gameid]" class="point" onclick="dofav($game[gameid])" alt="$vbphrase[sub_favorite]" border="0" /><else /><img src="$vboptions[arcadeimages]/addfav.gif" align="absmiddle" id="fav_$game[gameid]" class="point" onclick="dofav($game[gameid])" alt="$vbphrase[add_favorite]" border="0" /></if></legend>
<div style="padding:0px 0px 0px 2px">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="$stylevar[left]" valign="middle" width="60" height="60">
<a href="arcade.php?do=play&amp;gameid=$game[gameid]"><img src="$vboptions[arcadeimages]/$game[stdimage]" style="border:1px dotted; border-color:#90939C" width="50" height="50" /></a>
</td>

<td class="$bgclass" align="$stylevar[right]" valign="top" width="100%" nowrap="nowrap">
<div style="font-size:9px">
<div><strong>$vbphrase[rating]:</strong> <if condition="!$game[rating]"><em>$vbphrase[none]</em><else /><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$game[rating].gif" alt="<phrase 1="$game[votecount]" 2="$game[rating_acc]" />$vbphrase[game_vote_info]</phrase>" border="0" /></if>
<div><strong>$vbphrase[filesize]:</strong> <em>$game[filesize]KB</em></div>
<div><strong>$vbphrase[category]:</strong> <em><a href="arcade.php?categoryid=$game[categoryid]">$game[catname]</a></em></div>
<if condition="!$game[highscorerid]">
<div><strong>Game Cost:</strong> $game[cost]</div>
<div><em><a href="arcade.php?do=play&amp;gameid=$game[gameid]">$vbphrase[play_now]</a></em></div>
<else />
<div><strong>$vbphrase[champion]:</strong> <em><a href="#" onmouseover="show_userinfo(this, 'userpanel', $game[highscorerid])" onmouseout="kill_panel()">$game[username]</a></em></div>
<div><strong>$vbphrase[high_score]:</strong> <em><a href="arcade.php?do=scores&amp;gameid=$game[gameid]">$game[highscore]</a></em></div>
<div><strong>$vbphrase[personalbest]:</strong> <em><if condition="!$game['personalbest']">$vbphrase[none]<else />$game[personalbest]</if></em></div>
<div><strong>Game Cost:</strong> $game[cost]</div>
</if>
</div>
</td>
</tr>
</table>
</div>
</fieldset>
</td>
$nextrow

imported_kyle
03-17-2006, 06:24 PM
For people who are using the vbbux arcade integration use the following code for arcade_game_bit_slim:

<td class="$bgclass" width="25%">
<fieldset class="fieldset" style="margin:0px 0px 0px 0px; padding:0px 2px 2px 2px">
<legend><a href="arcade.php?do=play&amp;gameid=$game[gameid]"><strong>$game[title]</strong></a>&nbsp;<if condition="$show['fav']"><img src="$vboptions[arcadeimages]/subfav.gif" align="absmiddle" id="fav_$game[gameid]" class="point" onclick="dofav($game[gameid])" alt="$vbphrase[sub_favorite]" border="0" /><else /><img src="$vboptions[arcadeimages]/addfav.gif" align="absmiddle" id="fav_$game[gameid]" class="point" onclick="dofav($game[gameid])" alt="$vbphrase[add_favorite]" border="0" /></if></legend>
<div style="padding:0px 0px 0px 2px">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="$stylevar[left]" valign="middle" width="60" height="60">
<a href="arcade.php?do=play&amp;gameid=$game[gameid]"><img src="$vboptions[arcadeimages]/$game[stdimage]" style="border:1px dotted; border-color:#90939C" width="50" height="50" /></a>
</td>

<td class="$bgclass" align="$stylevar[right]" valign="top" width="100%" nowrap="nowrap">
<div style="font-size:9px">
<div><strong>$vbphrase[rating]:</strong> <if condition="!$game[rating]"><em>$vbphrase[none]</em><else /><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$game[rating].gif" alt="<phrase 1="$game[votecount]" 2="$game[rating_acc]" />$vbphrase[game_vote_info]</phrase>" border="0" /></if>
<div><strong>$vbphrase[filesize]:</strong> <em>$game[filesize]KB</em></div>
<div><strong>$vbphrase[category]:</strong> <em><a href="arcade.php?categoryid=$game[categoryid]">$game[catname]</a></em></div>
<if condition="!$game[highscorerid]">
<div><strong>Game Cost:</strong> $game[cost]</div>
<div><em><a href="arcade.php?do=play&amp;gameid=$game[gameid]">$vbphrase[play_now]</a></em></div>
<else />
<div><strong>$vbphrase[champion]:</strong> <em><a href="#" onmouseover="show_userinfo(this, 'userpanel', $game[highscorerid])" onmouseout="kill_panel()">$game[username]</a></em></div>
<div><strong>$vbphrase[high_score]:</strong> <em><a href="arcade.php?do=scores&amp;gameid=$game[gameid]">$game[highscore]</a></em></div>
<div><strong>$vbphrase[personalbest]:</strong> <em><if condition="!$game['personalbest']">$vbphrase[none]<else />$game[personalbest]</if></em></div>
<div><strong>Game Cost:</strong> $game[cost]</div>
</if>
</div>
</td>
</tr>
</table>
</div>
</fieldset>
</td>
$nextrow<td class="$bgclass" width="25%">
<fieldset class="fieldset" style="margin:0px 0px 0px 0px; padding:0px 2px 2px 2px">
<legend><a href="arcade.php?do=play&amp;gameid=$game[gameid]"><strong>$game[title]</strong></a>&nbsp;<if condition="$show['fav']"><img src="$vboptions[arcadeimages]/subfav.gif" align="absmiddle" id="fav_$game[gameid]" class="point" onclick="dofav($game[gameid])" alt="$vbphrase[sub_favorite]" border="0" /><else /><img src="$vboptions[arcadeimages]/addfav.gif" align="absmiddle" id="fav_$game[gameid]" class="point" onclick="dofav($game[gameid])" alt="$vbphrase[add_favorite]" border="0" /></if></legend>
<div style="padding:0px 0px 0px 2px">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="$stylevar[left]" valign="middle" width="60" height="60">
<a href="arcade.php?do=play&amp;gameid=$game[gameid]"><img src="$vboptions[arcadeimages]/$game[stdimage]" style="border:1px dotted; border-color:#90939C" width="50" height="50" /></a>
</td>

<td class="$bgclass" align="$stylevar[right]" valign="top" width="100%" nowrap="nowrap">
<div style="font-size:9px">
<div><strong>$vbphrase[rating]:</strong> <if condition="!$game[rating]"><em>$vbphrase[none]</em><else /><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$game[rating].gif" alt="<phrase 1="$game[votecount]" 2="$game[rating_acc]" />$vbphrase[game_vote_info]</phrase>" border="0" /></if>
<div><strong>$vbphrase[filesize]:</strong> <em>$game[filesize]KB</em></div>
<div><strong>$vbphrase[category]:</strong> <em><a href="arcade.php?categoryid=$game[categoryid]">$game[catname]</a></em></div>
<if condition="!$game[highscorerid]">
<div><strong>Game Cost:</strong> $game[cost]</div>
<div><em><a href="arcade.php?do=play&amp;gameid=$game[gameid]">$vbphrase[play_now]</a></em></div>
<else />
<div><strong>$vbphrase[champion]:</strong> <em><a href="#" onmouseover="show_userinfo(this, 'userpanel', $game[highscorerid])" onmouseout="kill_panel()">$game[username]</a></em></div>
<div><strong>$vbphrase[high_score]:</strong> <em><a href="arcade.php?do=scores&amp;gameid=$game[gameid]">$game[highscore]</a></em></div>
<div><strong>$vbphrase[personalbest]:</strong> <em><if condition="!$game['personalbest']">$vbphrase[none]<else />$game[personalbest]</if></em></div>
<div><strong>Game Cost:</strong> $game[cost]</div>
</if>
</div>
</td>
</tr>
</table>
</div>
</fieldset>
</td>
$nextrow

I tried this but now it is showing double for each game, 2 of everything.

bass.exe21
03-18-2006, 12:19 AM
Did you replace the template?

imported_Black Cobra
04-04-2006, 01:00 AM
I have the same prob with double of everything.

it streches across the screen, should be 3 wide instead of 6.

Oblivion Knight
04-05-2006, 06:10 AM
I have the same prob with double of everything.

it streches across the screen, should be 3 wide instead of 6.I don't see how it could possibly do that, but it seems to be a common problem for some users..

Hopefully when it's made into a plugin using v3arcade's custom hooks, it should take care of this.. The plugin version will require a different method of coding than the code version, and so any potential conflicts should be taken care of.

I have no ETA for you, however. Probably shortly after the release of v3arcade 1.1.0..

imported_Black Cobra
04-11-2006, 08:20 AM
cool will look forward to that release..

foxfirediego
04-24-2006, 05:50 PM
why the games don't go to the next row?
check it
@edit
using with 1.0.6

Oblivion Knight
04-24-2006, 06:04 PM
It looks like you've either not uploaded your modified arcade.php file, or you may need to check and save the additional vBulletin Options that have been added for the Arcade in the admincp.

foxfirediego
04-24-2006, 06:28 PM
thanks O.K., that's it :)

sparkfndr
05-12-2006, 08:01 PM
installed this today and i like the layout and so do my members