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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-14-2006, 05:44 PM
Rouzbeh1 Rouzbeh1 is offline
 
Join Date: Sep 2006
Posts: 111
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default save html code in variables to call in templates

hi
i want to store some html code in a variable and call them in the template.
how do i do this?

example :
HTML Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle]</title>
$headinclude
</head>
<body>
$header

$navbar

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td align="center" valign="middle">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="middle" class="bar" style="height: 25px;">
<table class="tborder" cellpadding="4" cellspacing="1" width="100%">
<tr>
<td class="vbmenu_control"><a href="pbsms.php">$vbphrase[pbsms_overview]</a></td>
<td class="vbmenu_control"><a href="konto.php">$vbphrase[pbsms_manageacct]</a></td>
<td class="vbmenu_control">
<!--a href="sms.php">$vbphrase[pbsms_smsbox]</a-->
<!-- start vBMenu control element -->
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td id="SMSBox" class="vbmenu_control"><a href="#">$vbphrase[pbsms_smsbox]</a>
<script type="text/javascript">
<!--
vbmenu_register("SMSBox");
//-->
</script>
</td>
</tr>
</table>
<!-- end vBMenu control element -->
<!-- start vBMenu popup element -->
<div class="vbmenu_popup" id="SMSBox_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead" align="left">$vbphrase[pbsms_smsbox]</td>
</tr>
<tr>
<td class="vbmenu_option" align="left"><a href="sms.php?do=smsin">$vbphrase[pbsms_inbox]</a></td>
</tr>
<tr>
<td class="vbmenu_option" align="left"><a href="sms.php?do=smsout">$vbphrase[pbsms_outbox]</a></td>
</tr>
</table>
</div>
<!-- end vBMenu popup element -->

</td>
<td class="vbmenu_control"><a href="konto.php">$vbphrase[pbsms_mysms]</a></td>
<td class="vbmenu_control"><a href="adresses.php">$vbphrase[pbsms_addressbook]</a></td>
<td class="vbmenu_control"><a href="options.php">$vbphrase[pbsms_settings]</a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" valign="top" height="409" style="height: 409px;">
<div style="height: 409px; overflow:auto;" class="content">
<script type="text/javascript">
<!--
image1 = new Image();
image1.src = "images/pbsms/smsmain_n.png";
image2 = new Image();
image2.src = "images/pbsms/mysms_n.png";
image3 = new Image();
image3.src = "images/pbsms/adresses_n.png";
image4 = new Image();
image4.src = "images/pbsms/credits_n.png";
image5 = new Image();
image5.src = "images/pbsms/preference_n.png";
image6 = new Image();
image6.src = "images/pbsms/logout_n.png";
//-->
</script>
<div align="center">
<table border="0"  cellspacing="10" cellpadding="2" >
<tr valign="top">
<td width="120" height="60" valign="bottom" align="center"><a href="sms.php?session={$session}"><img name="smsmain" src="images/pbsms/smsmain_m.png" onmouseover = "document.smsmain.src = 'images/pbsms/smsmain_n.png'" onmouseout = "document.smsmain.src = 'images/pbsms/smsmain_m.png'" alt="$vbphrase[pbsms_smsbox]" border="0" /></a><br /><b>$vbphrase[pbsms_smsbox]</b></td>
<td width="120" height="60" valign="bottom" align="center"><a href="main.php?do=mysms&amp;session={$session}"><img name="mysms" src="images/pbsms/mysms_m.png" onmouseover = "document.mysms.src = 'images/pbsms/mysms_n.png'" onmouseout = "document.mysms.src = 'images/pbsms/mysms_m.png'" alt="$vbphrase[pbsms_mysms]" border="0" /></a><br /><b>$vbphrase[pbsms_mysms]</b></td>
<td width="120" height="60" valign="bottom" align="center"><a href="adresses.php?session={$session}"><img name="adresses" src="images/pbsms/adresses_m.png" onmouseover = "document.adresses.src = 'images/pbsms/adresses_n.png'" onmouseout = "document.adresses.src = 'images/pbsms/adresses_m.png'" alt="$vbphrase[pbsms_addressbook]" border="0" /></a><br /><b>$vbphrase[pbsms_addressbook]</b></td>
</tr>
<tr>
<td width="120" height="60" valign="bottom" align="center"><a href="konto.php?session={$session}"><img name="credits" src="images/pbsms/credits_m.png" onmouseover = "document.credits.src = 'images/pbsms/credits_n.png'" onmouseout = "document.credits.src = 'images/pbsms/credits_m.png'" alt="$vbphrase[pbsms_manageacct]" border="0" /></a><br /><b>$vbphrase[pbsms_manageacct]</b></td>
<td width="120" height="60" valign="bottom" align="center"><a href="options.php?session={$session}"><img name="prefs" src="images/pbsms/preference_m.png" onmouseover = "document.prefs.src = 'images/pbsms/preference_n.png'" onmouseout = "document.prefs.src = 'images/pbsms/preference_m.png'" alt="$vbphrase[pbsms_settings]" border="0" /></a><br /><b>$vbphrase[pbsms_settings]</b></td>
<td width="120" height="60" valign="bottom" align="center"><a href="main.php?do=logout&amp;session={$session}" onclick="return(confirm('M?chten Sie sich wirklich ausloggen?'));"><img name="logout" src="images/pbsms/logout_m.png" onmouseover = "document.logout.src = 'images/pbsms/logout_n.png'" onmouseout = "document.logout.src = 'images/pbsms/logout_m.png'" alt="Logout" border="0" /></a><br /><b>Logout</b></td>
</tr>
</table>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
$footer
</body>
</html>
this code :
HTML Code:
<!-- start vBMenu control element -->
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td id="SMSBox" class="vbmenu_control"><a href="#">$vbphrase[pbsms_smsbox]</a>
<script type="text/javascript">
<!--
vbmenu_register("SMSBox");
//-->
</script>
</td>
</tr>
</table>
<!-- end vBMenu control element -->
<!-- start vBMenu popup element -->
<div class="vbmenu_popup" id="SMSBox_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead" align="left">$vbphrase[pbsms_smsbox]</td>
</tr>
<tr>
<td class="vbmenu_option" align="left"><a href="sms.php?do=smsin">$vbphrase[pbsms_inbox]</a></td>
</tr>
<tr>
<td class="vbmenu_option" align="left"><a href="sms.php?do=smsout">$vbphrase[pbsms_outbox]</a></td>
</tr>
</table>
</div>
<!-- end vBMenu popup element -->
should get saved in a variable like $dhtml_menu and then i use it in some template....
Reply With Quote
 


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 08:14 PM.


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.03692 seconds
  • Memory Usage 2,456KB
  • Queries Executed 12 (?)
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
  • (2)bbcode_html
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)showthread_list
  • (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_threadedmode.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_threaded
  • showthread_threaded_construct_link
  • 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