Jump to content

PHP script - html integration


crossing

Recommended Posts

Hello,

 

One month ago I decided to start a project opening a job site. So, I have found this script smartjobboard.com and buy it. I have spent it the last three weeks building one great html template (using Dreamweaver) hoping it will be easy to integrate php script just by paste the code on my html page, on specified spaces.

 

Now I 'am shocked to see I have no clue how to use my template with the software I brought.

 

I have attached screenshot of the template I have created with empty spaces where I need the register form to be .Next message contain code from script with registration form I need to load on my html template (registration_form.tpl )

 

The smartjobboard script uses 5 default themes which are ugly and old, what I have noticed is that other clients that use the script, they build php template and attached on special templates folder on the script ,then activate it via admin panel.

 

 

 

Do I have any chance to use my html template ? Anyone can help me to do it ?

 

Info about bord (demo panels) can be found here, together with documentation here http://www.smartjobboard.com/wiki/

post-139011-0-88265500-1359916138_thumb.gif

Edited by crossing
Link to comment
Share on other sites

<script language="Javascript" type="text/javascript" src="{$GLOBALS.site_url}/system/ext/jquery/jquery-ui.js"></script>

<script language="Javascript" type="text/javascript" src="{$GLOBALS.site_url}/system/ext/jquery/jquery.bgiframe.js"></script>

<script language="Javascript" type="text/javascript" src="{$GLOBALS.site_url}/system/ext/jquery/jquery.form.js"></script>

<script type="text/javascript" language="Javascript">

{literal}

function checkField( obj, name ) {

if (obj.val() != "") {

var options = {

data: { isajaxrequest: 'true', type: name },

success: showResponse

};

$("#registr-form").ajaxSubmit( options );

}

function showResponse(responseText, statusText, xhr, $form) {

var mes = "";

switch(responseText) {

case 'NOT_VALID_EMAIL_FORMAT':

mes = "{/literal}[]{literal}";

break;

case 'NOT_UNIQUE_VALUE':

mes = "{/literal}[[this value is already used in the system]]{literal}";

break;

case 'HAS_BAD_WORDS':

mes = "{/literal}[[has bad words]]{literal}";

break;

case '1':

mes = "";

break;

}

$("#am_" + name).text(mes);

}

};

{/literal}

</script>

 

<h1>[[{$user_group_info.name}]] [[Registration]]</h1>

<div class="soc_reg_form">{module name="social" function="social_plugins"}</div>

{foreach from=$errors item=error key=field_caption}

<p class="error">

{if $error eq 'EMPTY_VALUE'}

{if $field_caption == "Enter code from image"}

[[Enter Security code]]

{else}

'[[FormFieldCaptions!{$field_caption}]]' [[is empty]]

{/if}

{elseif $error eq 'NOT_UNIQUE_VALUE'}

'[[FormFieldCaptions!{$field_caption}]]' [[this value is already used in the system]]

{elseif $error eq 'NOT_CONFIRMED'}

'[[FormFieldCaptions!{$field_caption}]]' [[not confirmed]]

{elseif $error eq 'NOT_VALID_ID_VALUE'}

[[You can use only alphanumeric characters for]] '{$field_caption}'

{elseif $error eq 'NOT_VALID_EMAIL_FORMAT'}

[]

{elseif $error eq 'NOT_VALID'}

{if $field_caption == "Enter code from image"}

[[security code is not valid]]

{else}

'[[FormFieldCaptions!{$field_caption}]]' [[is not valid]]

{/if}

{elseif $error eq 'LOCATION_NOT_EXISTS'}

'[[FormFieldCaptions!{$field_caption}]]' [[value does not exist in the database]]

{elseif $error eq 'HAS_BAD_WORDS'}

'{$field_caption}' [[has bad words]]

{else}

[[{$error}]]

{/if}

</p>

{/foreach}

{* for social plugins *}

{if $socialRegistration}

<p>[[You’re almost registered on our site! Please complete the form below to finish the registration.]]</p>

{/if}

{* end of "for social plugins" *}

<br/>[[Fields marked with an asterisk (]]<font color="red">*</font>[[) are mandatory]]<br/>

<form method="post" action="" enctype="multipart/form-data" onsubmit="return checkform();" id="registr-form">

<input type="hidden" name="action" value="register" />

{set_token_field}

{foreach from=$form_fields item=form_field}

{if $user_group_info.show_mailing_flag==0 && $form_field.id=="sendmail"}

{else}

<fieldset>

<div class="inputName">[[$form_field.caption]]</div>

<div class="inputReq"> {if $form_field.is_required}*{/if}</div>

<div class="inputField">{input property=$form_field.id}</div>

{if $form_field.instructions}{assign var="instructionsExist" value="1"}{include file="../classifieds/instructions.tpl" form_field=$form_field}{/if}

</fieldset>

{/if}

{/foreach}

{if $terms_of_use_check != 0}

<fieldset>

<div class="inputName">[[Accept terms of use]]</div>

<div class="inputReq">*</div>

<div class="inputField">

<input type="checkbox" name="terms" {if $smarty.post.terms}checked{/if} id="terms" />

<a style='cursor:pointer; color: #666666; text-decoration:underline;' onclick="popUpWindow('{$GLOBALS.site_url}/terms-of-use-pop/', 512, 600, '[[Terms of use]]')">[[Read terms of use]]</a>

</div>

</fieldset>

{/if}

<fieldset>

<div class="inputName"> </div>

<div class="inputReq"> </div>

<div class="inputField"><input type="hidden" name="user_group_id" value="{$user_group_info.id}" /> <input type="submit" value="[[Register:raw]]" /></div>

</fieldset>

</form>

{if $instructionsExist}

{literal}

<script type="text/javascript">

$("document").ready(function() {

var elem = $(".instruction").prev();

elem.children().focus(function() {

$(this).parent().next(".instruction").children(".instr_block").show();

});

elem.children().blur(function() {

$(this).parent().next(".instruction").children(".instr_block").hide();

});

});

CKEDITOR.on('instanceReady', function(e) {

e.editor.on('focus', function() {

$("#instruction_"+ e.editor.name).show();

});

e.editor.on('blur', function() {

$("#instruction_"+e.editor.name).hide();

});

return;

});

</script>

{/literal}

{/if}

<script language='Javascript' type='text/javascript'>

function checkform() {ldelim}

 

{if $terms_of_use_check != 0}

if (!document.getElementById('terms').checked) {ldelim}

alert('[[Read terms of use]]');

return false;

{rdelim}

{/if}

 

return true;

 

{rdelim}

</script>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.