vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   How to create your own vBulletin-powered page! (uses vB templates) (https://vborg.vbsupport.ru/showthread.php?t=62164)

ragtek 02-27-2009 07:53 PM

instead of
PHP Code:

$satirlar 

you need
PHP Code:

$satirlar .= 


Adem GEN? 02-27-2009 08:14 PM

<div align="left">Thank you very much

</div>

brad2010 02-28-2009 01:06 AM

Hi

I am newbie. Sorry if bother.

I follow your instruction. I combine .php and htm code in one file at test.php in Template editor from my Style Manager > Edit Template .

Do i make things correct? Please help me

How do I call the page?

JamesAB 02-28-2009 06:41 AM

Quote:

Originally Posted by ragtek (Post 1755762)
you added it at hook global_start

No. I was trying to use it in the custom page itself. :o

Putting it in the global_start hook made it work for me.

Thanks for your help ragtek.

Now the only glitch (for me) is the fact that I would prefer not to show notices on my custom page. I'm guessing they are tied in with the navbar?

Is there a way to disable showing notices here?

Thanks,
James

ragtek 02-28-2009 06:56 AM

Without realy looking and checking i make it with this little "dirty" plugin: add a plugin at global_setup_complete with
PHP Code:

if (THIS_SCRIPT == 'foo')
{
$show['notices'] = false;



Adem GEN? 02-28-2009 08:16 AM

I need a help

1. line "alt1"
2. line "alt2"
3. line "alt1"
4. line "alt2"
........
like

How do I do?
You give examples?
#1007 Be my use of the code

Thanks

ragtek 02-28-2009 08:26 AM

with the exec_switch_bg function

Adem GEN? 02-28-2009 09:55 AM

Quote:

Originally Posted by ragtek (Post 1756736)
with the exec_switch_bg function

Answer Is it for me?

If you are for me

I am Novice, Request, Can you give sample code?

ragtek 02-28-2009 10:06 AM

the best for you would be

1. create a template tel_bit and put this into:

Code:

<tr class="$bgclass"><td>$tel_list_al[telefon_sah].....all your other stuff..
then in the while part:
PHP Code:

             while($tel_list_al=mysql_fetch_object($sorgula)) 
{
   eval(
'$satirlar .= "' fetch_template('tel_bit') . '";');



Adem GEN? 02-28-2009 11:36 AM

Sorry, but I could not do:(

New template "tel_bit"
PHP Code:

<tr class="$bgclass"><td>$tel_list_al[telefon_sahibi_adi$tel_list_al[telefon_sahibi_soyadi]</td></tr>
<
tr class="$bgclass"><td>$tel_list_al[cep_tel_kodu$tel_list_al[cep_tel_numara]</td></tr>
<
tr class="$bgclass"><td>$tel_list_al[ev_tel_kodu$tel_list_al[ev_tel_numara]</td></tr>
<
tr class="$bgclass"><td>$tel_list_al[is_tel_kodu$tel_list_al[is_tel_numara]</td></tr>
<
tr class="$bgclass"><td>$tel_list_al[aciklama]</td></tr>
<
tr class="$bgclass"><td>$tel_list_al[kullanici_adi]</td></tr

php liles
PHP Code:

                     $sorgulamysql_query("SELECT * FROM telefon_listesi");

             while(
$tel_list_al=mysql_fetch_object($sorgula)) 
{
   eval(
'$satirlar .= "' fetch_template('tel_bit') . '";');


Base template "telefon_rehberi"
PHP 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 class="tcat">Telefon Rehberi</td>
</
tr>

<
tr>
      <
td width="16%" class="thead">Ad&#305; Soyadı</td>
        
<td width="13%" class="thead">Cep Telefon</td>
        <
td width="13%" class="thead">Ev Telefon</td>
        <
td width="13%" class="thead">&#304;ş Telefon</td>
        
<td width="27%" class="thead">A?&#305;klama</td>
        
<td width="16%" class="thead">Ekleyen</td>
    
</
tr>

$satirlar

</table>
<
br />
$footer
</body>
</
html

Error this: Fatal error: Cannot use object of type stdClass as array in *******\telefon_rehberi.php(394) : eval()'d code on line 1

394 line ->
eval('$satirlar .= "' . fetch_template('tel_bit') . '";');
Where am I wrong?


All times are GMT. The time now is 08:37 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.05182 seconds
  • Memory Usage 1,776KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (7)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete