MyBB-Plugins Forums

Full Version: Code Modifications - Copying from Test to Live
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I have posted this over at MyBB, but I thought you may be able to assist me here as we haven't managed to work it out yet.

My site is http://www.vampirecounts.net

Recently someone was working on a modification on my test site, which would insert a random quote generator, which would display on every page in the header.

They had their own access and made the necessary modifications, except one function.

The problem was is that whilst he did 99% of it, he then disappeared and I am unsure what I need to do to copy this function over to my live site - unfortunately I am not very technical.

He has made alterations to coding in various areas, and the problem is that I cannot find all the changes he made to make everything work. I have found most, and I am hoping that someone can point me in the right direction so I can find the remaining and do the necessary changes on my live site.

Here is what I have found so far:

Added to end of header:
PHP Code:
<div class="tborder">
    <
div class="thead">
<
strong>Quotes</strong>
<
div class="expcolimage">
<
img src="images/carpe-noctem/collapse.gif" id="quotes_col" class="expander" alt="[-]" title="[-]" style="cursor: pointer; ">
</
div>
    </
div>
<
p id="quotes"></p>
</
div>
<
br /> 

Inserted into headerinclude
PHP Code:
<script type="text/javascript" src="{$mybb->settings['bburl']}/{$theme['imgdir']}/jscripts/quotes.js"></script> 

File added into theme jscript folder:

quotes.js
PHP Code:
var quote = new Array()

quote[0] = "I recently purchased a bretonian men at arms kit and of course the giant kit.  I LOVE EXTRAS!!!! Sure we have our gravestones and our arrows.... The Bretonian spru has a snail! A SNAIL!!! <br><em>SethDrallitoc @ CN</em>"
quote[1] = "People could just call them dire hamsters and call the doom wolf Hamtaro painting the hair (well, the few strings of hair) yellow<br><em>Redna Xela @ CN</em>"
quote[2] = "MvC: yeah...last time i was in a GW the manager guy spent like 5 mins trying to convince me to buy 2 zombie boxs instead of 1 box and a pack of bases ...they really care too much about profits.<br>E: Not 'How can we help you?' its now 'How much can we sell you?' WD is gone the same. <br><em>Maxim von Carstein & Elyrioth @ CN</em>"
quote[3] = "Oh the sheer thought of destroying some five-year-old with glasses who loves that whole ninja/sneaky genre and getting him weened off that BS early in life just sets me aquiver<br><em>Defender of Ulthuan</em>"
quote[4] = "I had to Google 'Big Red Book' to figure out it meant the WFB rulebook - I thought it had something to do with Mao.<br><em>Condottiere @ Ogre Stronghold</em> "
quote[5] = "I'm just suprised that GW! of all people came up with a great idea like this. It scares me that they may be getting smarter.<br>On a side note- Well, us americans will be saving roughly four dollars - Hooray!<br><em>Huoshini @ Warseer</em>"
quote[6] = "I agree. Everything else would do my army some good. But, good god, I can't justify spending money on Alith Anar and his friends.<br><em>Ethlorien @ Warseer</em>"    
quote[7] = "A night goblin WAAAGH without squigs is like a hairless grizzly bear. Plain wrong and very disturbing. So I have squigs. <br><em>GobbladasSquig</em>"    
quote[8] = "Hmm, I can see it now. Soldier 1 'Hey, Guys, I'm hitting this 'ere Squig and Goblins are dying! WTF is happening with that, eh?! Wierd or what!' Soldier 2 'Dunno, but it's definitely wierd. I'm hitting these Goblins but the Squigs aren't dying!' <br><em>Darmort @ CN</em>"
quote[9] = "I was travelling with my large-scale live steam engine worth more than several WHFB armies together, and the securigits want to take it apart. NO!. They will not be able to get in the boiler so they want to CUT IT OPEN and when I say, I'll check it instead, they are CONVINCED its some sort of bomb. I miss several flights as they take my checked luggage apart looking very funny at my butane cans, water, etc. I fired the thing up on the floor started the radio control and then had half the airport force, it seemed, watching my loco chuff-chuff back and forward on the floor. After it cooled down, a railfan amongst them escorted me onto my plane.<br><em>ArchMagosAlchemys @ CN</em>" 


I also found the following two files in Global Templates. However I should note that I have messed around with them, even renaming them and then seem to have no affect at all. The generator still works:

quotes
PHP Code:
<div style="background-color: #101010; color: #848484; border-top: 1px solid #525252; border-bottom: 1px solid #525252; border-left: 1px solid #525252; border-right: 1px solid #525252; text-align: center; margin: 10px auto; padding: 5px 20px">
    <
strong>{$mybb->settings['quotestext']}</strong><br />
    {
$showrandomquotes}
</
div

quotes_alt
PHP Code:
<table width="100%" border="0" cellspacing="{$theme['borderwidth']}cellpadding="{$theme['tablespace']}class="tborder">
<
thead>
    <
tr>
        <
td class="thead">
            <
div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['quotes']}.gif" id="quotes_img" class="expander" alt="[-]" /></div><div><strong>{$mybb->settings['quotestext']}</strong></div>
        </
td>
    </
tr>
</
thead>
<
tbody style="{$collapsed['quotes_e']}id="quotes_e">
    <
tr>
        <
td class="trow1">{$showrandomquotes}</td>
    </
tr>
</
tbody>
</
table>
<
br/> 

I did try copying over the header / headerinclude and quotes.js to their correct locations on the live site, but it only created an empty table (no quotes) - also for some reason the swirls around the existing forum tables where not applied in the live site but where in the demo.

If anyone can help I would much appreciate it. Oh yes, the one thing that wasn't done was for the expand and collapse button on the right to work (like you can do for forum sections), so members can hide the generator if it annoys them.

Sorry for the essay, but I figure more info would help!

Cheers

DoN

No Permission

Unfortunately you do not have sufficient rights to view replies in this thread.