Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
To those who like quickhost and have a phpbb forum
#1
Zap worked up some code awhile ago so that quickhost can be built right into your forum, meaning as someone's about to post, they can upload something directly from the forum they are posting on an add it to the post. When Zap wrote it I promised I'd give the code out, but didn't, so I guess I'll do that now.

If you want to see what it looks like, we have it set up at fbtk (only under the subsilver style).

Anyway, if you'd like to mod it into your forum (and if you wouldn't want to add it to your forum, then skip over all this text and move to some other post), here's what you need to.

In posting_body.tpl, right after

Code:
<tr>
            <td>
              <input type="checkbox" name="delete" />
            </td>
            <td><span class="gen">{L_DELETE_POST}</span></td>
          </tr>
          <!-- END switch_delete_checkbox
          <!-- BEGIN switch_type_toggle
          <tr>
            <td></td>
            <td><span class="gen">{S_TYPE_TOGGLE}</span></td>
          </tr>
          <!-- END switch_type_toggle
        </table>
      </td>
    </tr>

add


Code:
<tr>
           <th class="thHead" colspan="2">Upload file to QuickHost</th>
    </tr>
        <tr>
           <td class="row1" colspan="2">
               <iframe src="http://qh2.qbtk.com/upload_form.php?layout=1"
                       allowtransparency="true"
                       frameborder="0"
                       scrolling="no"
                       width="100%"
                       height="190">
                       Your browser does not support iFrames, so you will have to go to the <a href="http://qh2.qbtk.com">QuickHost Website</a> to upload files.
               </iframe>
           </td>
        </tr>


Text and link color can be controlled by changing

Code:
src="http://qh2.qbtk.com/upload_form.php?layout=1"

to

Code:
src="http://qh2.qbtk.com/upload_form.php?layout=1&text_color=hex&link_color=hex"

Where #hex is a hexadecimal color code (like 99FFCC, no preceding #). Either of the two arguments can be included or not by wish, if they arent, text & link will have default colors (black and blue). The only possible value for the <i>layout</i> argument so far is 1.
url=http://fileanchor.com]FileAnchor[/url] - ImageAnchor - FBTK - QbasicNews - VPlanet - Various
Reply
#2
wow, sumo! Nice to see you drop by again, its been a while hasnt it!

Good job on QH2 and everything, hope you are doing good yourself.
Reply
#3
Thanks for the code. I may ask a few boards to integrate it.
Reply
#4
I will. But the problem is, I have to modify all the scripts in every theme to make it work. Unless I just make two or three active themes...

Can you modify that to use the colours set by the css?

EDIT:

That caused a parse error:
Quote:Parse error: parse error, unexpected T_STRING in /home/anarky/public_html/forum/includes/template.php(127) : eval()'d code on line 477

Assistance?

>anarky
Screwing with your reality since 1998.
Reply
#5
Quote:Can you modify that to use the colours set by the css?

No, unfortunately you cannot. It's due to the fact that it is in it's own iframe, which makes the browser ignore any css (among other stuff) applied to the main frame (the rest of the page).
url=http://www.copy-pasta.com]CopyPasta[/url] - FilePasta
Reply
#6
Fair enough.

I've fixed the error. Now I shall include the code in all themes.

BTW Your code was flawed.

Code:
<tr>
           <th class="thHead" colspan="2">Upload file to QuickHost</th>
      <tr>
           <td class="row1" colspan="2">
               <iframe src="http://qh2.qbtk.com/upload_form.php?layout=1"
                       allowtransparency="true"
                       frameborder="0"
                       scrolling="no"
                       width="100%"
                       height="190">
                       Your browser does not support iFrames, so you will have to go to the <a href="http://qh2.qbtk.com">QuickHost Website</a> to upload files.
               </iframe>
           </td>
        </tr>

That works.

>anarky
Screwing with your reality since 1998.
Reply
#7
Quote:wow, sumo! Nice to see you drop by again, its been a while hasnt it!

Good job on QH2 and everything, hope you are doing good yourself.

I've been moving around here and there. Thanks for the hope, quickhost is really starting to pick up so it's good. Although we are going to be changing the name soon ( http://fbtk.qbtk.com/phpBB2/viewtopic.php?t=331 for anyone who wants to help pick a new name).

Also all credit for the code goes to Zap on this one, so if it's bad, it's his fault and if it is good, thank me and I'll try to mention it to him.
url=http://fileanchor.com]FileAnchor[/url] - ImageAnchor - FBTK - QbasicNews - VPlanet - Various
Reply
#8
[quote]Also all credit for the code goes to Zap on this one, so if it's bad, it's his fault and if it is good, thank me and I'll try to mention it to him.[/qoute]

Ah, now everything is back in order...


Anarky: I don't see how your code would work properly, with two <tr>'s in a row, without any </tr> in between. But if it works for you, fair nuf Smile
url=http://www.copy-pasta.com]CopyPasta[/url] - FilePasta
Reply
#9
Right before the PollBox command or whatever it is. That's where it was put. It works in the forum ONLY if I used the slightly modified code. Otherwise I got a parse error. *shrugs*

>anarky
Screwing with your reality since 1998.
Reply
#10
vote for quickhost's name here: http://fbtk.qbtk.com/phpBB2/viewtopic.php?t=341
url=http://fileanchor.com]FileAnchor[/url] - ImageAnchor - FBTK - QbasicNews - VPlanet - Various
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)