Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-30-2007, 06:19 AM
wilde108 wilde108 is offline
 
Join Date: Dec 2006
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Problem with a table.

I installed "Yet Another Vbulletin Awards system" for vb 3.5 and it works great, but I am using Subdreamer 2.4 CMS and am using the forum skinning feature and have found that the when I click on request an award from the awards.php file the formatting is all wrong. The forum skin formats all the other pages just fine and when its unskinned the page works. I think its a table issue on the request_award.php file.

Here is a link to what im talking about. Go to this link http://www.photoshopchop.com/forum/awards.php and click on request award. If your lazy here is another link to the issue http://www.photoshopchop.com/forum/r...php?award_id=6 The file request_award calls on a file called awards_request_form.

I have attached both codes below. Maybe someone can tell me where to start.

request_award.php

<?php
/*================================================= =====================*\
|| ################################################## ################## ||
|| # Yet Another Award System 3.5 v2.1.0 ? by HacNho # ||
|| # Copyright (C) 2005 by HacNho, All rights reserved. # ||
|| # Credit for Dr Erwin Loh and Abe1 for their Form Hack # ||
|| # ---------------------------------------------------------------- # ||
|| # For use with vBulletin Version 3.5.0 # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| # Discussion and support available at # ||
|| # https://vborg.vbsupport.ru/showthread.php?t=94836 # ||
|| # ---------------------------------------------------------------- # ||
|| # CVS: $RCSfile: request_award.php,v 2.1.0 - Revision: 051127 # ||
|| ################################################## ################## ||
\*================================================ ======================*/

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

$globaltemplates = array(
'awards_request_form',
'awards_request_formanswers'
);

$phrasegroups = array('award');

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

if (!($permissions['awardpermissions'] & $vbulletin->bf_ugp_awardpermissions['canrequestaward']))
{
print_no_permission();
}

// ################################################## #####################
// ######################## START MAIN SCRIPT ############################
// ################################################## #####################

// start navbar
$navbits = array(
"awards.php?$session[sessionurl]" => $vbphrase[award_formtitle]
);

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');

if (empty($_REQUEST['do']))
{
$_REQUEST['do'] = 'request';
}


if ($_REQUEST['do']=='submit')
{
require_once(DIR . '/includes/functions_newpost.php');
$vbulletin->input->clean_array_gpc('p', array(
'award_id' => TYPE_UINT,
'award_request_name' => TYPE_STR,
'award_request_recipient_name' => TYPE_STR,
'award_request_reason' => TYPE_STR,
));

if ($vbulletin->GPC['award_request_name'] == '' OR $vbulletin->GPC['award_request_recipient_name'] == '' OR $vbulletin->GPC['award_request_reason'] == '')
{
$errormessage = $vbphrase['award_request_field_missing'];
eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
exit();
}

if (!empty($vbulletin->GPC['award_id']))
{
$award = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "award WHERE award_id = ". $vbulletin->GPC['award_id'] ."");
}

$award_request_name = $vbulletin->GPC['award_request_name'];
$award_request_recipient_name = $vbulletin->GPC['award_request_recipient_name'];
$award_request_reason = $vbulletin->GPC['award_request_reason'];
eval('$formsend = "' . fetch_template('awards_request_formanswers') . '";');

$posttitle = construct_phrase($vbphrase['award_request_post_title'], "$award_request_recipient_name");

if ($vbulletin->options[award_request_formforumid] > 0)
{
$foruminfo = verify_id('forum', $vbulletin->options[award_request_formforumid], 0, 1);
$forumperms = fetch_permissions($foruminfo[forumid]);
$newpost['message'] =& $formsend;
$newpost['title'] =& $posttitle;
$newpost['parseurl'] = '1';
$newpost['emailupdate'] = '9999';

if ($vbulletin->userinfo['signature'] != '')
{
$newpost['signature'] = '1';
}
else
{
$newpost['signature'] = '0';
}

build_new_post('thread', $foruminfo, array(), array(), $newpost, $errors);

if ($vbulletin->options[award_request_formpoll] == "1")
{
$polloption[1] = "Yes";
$polloption[2] = "No";
$polloption[3] = "Maybe";

$threadinfo = verify_id('thread', $newpost[threadid], 0, 1);
$polloptions = count($polloption);
$question = $posttitle;
$vbulletin->GPC['options'] = $polloption;

$counter = 0;
$optioncount = 0;
$badoption = '';
while ($counter++ < $polloptions)
{ // 0..Pollnum-1 we want, as arrays start with 0
if ($vbulletin->options['maxpolllength'] AND vbstrlen($vbulletin->GPC['options']["$counter"]) > $vbulletin->options['maxpolllength'])
{
$badoption .= iif($badoption, ', ') . $counter;
}
if (!empty($vbulletin->GPC['options']["$counter"]))
{
$optioncount++;
}
}

// Add the poll
$poll =& datamanager_init('Poll', $vbulletin, ERRTYPE_STANDARD);

$counter = 0;
while ($counter++ < $polloptions)
{
if ($vbulletin->GPC['options']["$counter"] != '')
{
$poll->set_option($vbulletin->GPC['options']["$counter"]);
}
}

$poll->set('question', $question);
$poll->set('dateline', TIMENOW);
$poll->set('active', '1');

$pollid = $poll->save();
//end create new poll

// update thread
$threadman =& datamanager_init('Thread', $vbulletin, ERRTYPE_STANDARD, 'threadpost');
$threadman->set_existing($threadinfo);
$threadman->set('pollid', $pollid);
$threadman->save();

}
}


if ($vbulletin->options['award_request_formreplythreadid'] > 0)
{
$threadinfo = verify_id('thread', $vbulletin->options['award_request_formreplythreadid'], 0, 1);
$forumperms = fetch_permissions($threadinfo[forumid]);
$newpost['message'] =& $formsend;
$newpost['title'] =& $posttitle;
$newpost['parseurl'] = "1";
$newpost['emailupdate'] = '9999';

if ($vbulletin->userinfo['signature'] != '')
{
$newpost['signature'] = '1';
}
else
{
$newpost['signature'] = '0';
}

build_new_post('reply', $foruminfo, $threadinfo, $postinfo, $newpost, $errors);
}

if (!empty($vbulletin->options['award_request_formpmname']))
{
$vbulletin->GPC['message'] =& $formsend;
$vbulletin->GPC['title'] =& $posttitle;
$vbulletin->GPC['recipients'] =& $vbulletin->options['award_request_formpmname'];

$pm['message'] =& $vbulletin->GPC['message'];
$pm['title'] =& $vbulletin->GPC['title'];
$pm['recipients'] =& $vbulletin->GPC['recipients'];


// create the DM to do error checking and insert the new PM
$pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY);

$pmdm->set('fromuserid', $vbulletin->userinfo['userid']);
$pmdm->set('fromusername', $vbulletin->userinfo['username']);
$pmdm->setr('title', $pm['title']);
$pmdm->setr('message', $pm['message']);
$pmdm->set_recipients($pm['recipients'], $permissions);
$pmdm->set('dateline', TIMENOW);
$pmdm->pre_save();

// process errors if there are any
$errors = $pmdm->errors;

if (!empty($errors))
{
$error = construct_errors($errors); // this will take the preview's place
eval(standard_error($error));
}
else
{
// everything's good!
$pmdm->save();
unset($pmdm);
}

}

if (!empty($vbulletin->options['award_request_formemailaddress']))
{
vbmail($vbulletin->options['award_request_formemailaddress'], $posttitle, $formsend);
}

$errormessage = $vbphrase['award_request_completed'];
eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
exit();
}

if ($_REQUEST['do'] == 'request')
{
$vbulletin->input->clean_array_gpc('r', array(
'award_id' => TYPE_UINT
));

if (empty($vbulletin->GPC['award_id']))
{
$errormessage = $vbphrase['award_request_noawardid'];
eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
exit();
}
$award = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "award WHERE award_id = ".$vbulletin->GPC['award_id'] ."");
eval('print_output("' . fetch_template('awards_request_form') . '");');
}
?>


awards_request_form

$stylevar[htmldoctype]
<html id="form" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle] - $vbphrase[award_formtitle]</title>
$headinclude
</head>
<body>
$header
$navbar

<form enctype="multipart/form-data" method="post" action="request_award.php">
<input type="hidden" value="submit" name="do">
<input type="hidden" value="$award[award_id]" name="award_id">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat" colspan="3">
$vbphrase[award]: $award[award_name] (id: $award[award_id])
</td>
</tr>
<tr>
<td class="panelsurround" align="center">
<div class="panel">
<div style="width:$stylevar[formwidth_usercp]" align="$stylevar[left]">

<br><div align="center"><img src="$award[award_img_url]"></div><br>
<if condition="$award[award_desc]">
<fieldset class="fieldset">
<legend>$vbphrase[award_description]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
<tr>
<td>$award[award_desc]</td>
</tr>
</table>
</fieldset>
</if>
</div>
</div>
</td>
</tr>
</table>

<br>

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat" colspan="3">
$vbphrase[award_formtitle]
</td>
</tr>
<tr>
<td class="panelsurround" align="center">
<div class="panel">
<div style="width:$stylevar[formwidth_usercp]" align="$stylevar[left]">
<fieldset class="fieldset" style="margin:0px">
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td>$vbphrase[award_formpurpose]</td>
</tr>
</table>
</fieldset>


<fieldset class="fieldset">
<legend>$vbphrase[username]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
<tr>
<td><b>$bbuserinfo[username]</b></td>
</tr>
</table>
</fieldset>

<fieldset class="fieldset">
<legend>$vbphrase[award_request_name]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
<tr>
<td></td>
</tr>
<tr>
<td><input type="text" class="bginput" size="30" name="award_request_name"></td>
</tr>
</table>
</fieldset>

<fieldset class="fieldset">
<legend>$vbphrase[award_request_recipient_name]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
<tr>
<td><input type="text" class="bginput" size="30" name="award_request_recipient_name"></td>
</tr>
</table>
</fieldset>

<fieldset class="fieldset">
<legend>$vbphrase[award_request_reason]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
<tr>
<td><textarea rows="5" cols="50" name="award_request_reason"></textarea></td>
</tr>
</table>
</fieldset>

</div>
</div>
</td>
</tr>
<tr>
<td class="panelsurround" align="center">
<div style="margin-top:$stylevar[cellpadding]px">
<input type="submit" name="submit" class="button" value="$vbphrase[submit]" accesskey="s" />
<input type="reset" name="reset" class="button" value="$vbphrase[reset_fields]" accesskey="r" />
</div>
</td>
</tr>

</table>
</td>
</tr>
</table>

</form>

$footer
</body>
</html>


can anyone help..... bump.
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 11:35 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.05164 seconds
  • Memory Usage 2,210KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete