Pagina 2 van 2

Re: Nieuwe button

Geplaatst: 29 mar 2009 17:27
door Raimon
T3KN0B0Y schreef:voor die nieuwe button; hij zegt dit:

Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ')' in C:\xampp\htdocs\cwalknl2\viewforum.php on line 293

code:

Code: Selecteer alles

	'POST_IMG'					=> ($forum_data['forum_status'] == ITEM_LOCKED) ? $user->img('button_topic_locked', $post_alt) : $user->img('button_topic_new', $post_alt),
	'NEW_BUTTON_IMG' -> $user->img('button_new', 'Nieuwe button'), 
gevonden, 'NEW_BUTTON_IMG' -> moet zijn 'NEW_BUTTON_IMG' =>
Klopt , ik had het verkeerd hier neer gezet, en op mijn test site wel goed neergezet :/
alleen nu zegt ie dit:

Parse error: syntax error, unexpected '(' in C:\xampp\htdocs\cwalknl2\includes\template.php(187) : eval()'d code on line 122

opgelost;

hier ligt de fout

Code: Selecteer alles

<!-- IF S_DISPLAY_POST_INFO and not S_IS_BOT and not FORUM_ID eg 2 -->
            <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle"><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a></td>
            
         <!-- ENDIF -->
dit is mn code:

Code: Selecteer alles

<!-- IF S_DISPLAY_POST_INFO or TOTAL_TOPICS -->
		<table width="100%" cellspacing="0" style="margin-bottom: 2px">
		<tr>
<!-- IF S_DISPLAY_POST_INFO and not S_IS_BOT and not FORUM_ID eg 2 -->
            <td align="{S_CONTENT_FLOW_BEGIN}" valign="middle"><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a></td>
            
         <!-- ENDIF -->
ook die heb ik gefixed, heb dit gedaan:
FORUM_ID eg 2 moet zijn: FORUM_ID == 2

edit nogmaals;

ook dit blijkt niet te werken, in een ander forum dan id 2, ziet hij 'm dan ook niet.
Neh dat is de fout niet ;)

zoek:

Code: Selecteer alles

<!-- IF S_DISPLAY_POST_INFO and not S_IS_BOT and not FORUM_ID eg 2 -->
vervang met :

Code: Selecteer alles

<!-- IF S_DISPLAY_POST_INFO and not S_IS_BOT and not FORUM_ID eq 2 -->
Ik had even een typ foutje gemaakt :P

Re: Nieuwe button

Geplaatst: 29 mar 2009 17:32
door T3KN0B0Y
dan zie ik de button nog steeds niet in andere forums hehe.

Re: Nieuwe button

Geplaatst: 29 mar 2009 19:30
door Raimon
zoek:

Code: Selecteer alles

<!-- IF S_DISPLAY_POST_INFO and not S_IS_BOT and not FORUM_ID eq 2 -->
vervang met:

Code: Selecteer alles

<!-- IF S_DISPLAY_POST_INFO and not S_IS_BOT && FORUM_ID != 2 -->
Of je stelt de forumpermissies in voor dat forum, dat gebruikers geen onderwerpen kunnen openen :)

Re: Nieuwe button

Geplaatst: 29 mar 2009 19:35
door T3KN0B0Y
Het werkt, heel erg bedankt!!

Re: Nieuwe button

Geplaatst: 30 mar 2009 21:27
door T3KN0B0Y
hmm, waarom werkt dit niet met viewtopic.php, heb zelfde edits gedaan in viewtopic.php en viewtopic_body etc.

Code: Selecteer alles

<!-- IF not S_IS_BOT -->
		<!-- IF FORUM_ID eq 2 -->
					<!-- IF S_DISPLAY_POST_INFO --><a href="{U_POST_NEW_TOPIC}">{NEW_BUTTON_IMG}</a>&nbsp;<!-- ENDIF -->
			<!-- IF S_DISPLAY_REPLY_INFO --><a href="{U_POST_REPLY_TOPIC}">{NEW_VOTE_IMG}</a><!-- ENDIF -->
			<!-- ENDIF -->
		<!-- IF S_DISPLAY_POST_INFO and not S_IS_BOT && FORUM_ID != 2 -->
			<!-- IF S_DISPLAY_POST_INFO --><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a>&nbsp;<!-- ENDIF -->
			<!-- IF S_DISPLAY_REPLY_INFO --><a href="{U_POST_REPLY_TOPIC}">{REPLY_IMG}</a><!-- ENDIF -->
		<!-- ENDIF -->
		<!-- ENDIF -->
ik krijg alleen die andere te zien die we ook in viewforum hadden gezet.

moet er nog meer gebeuren voor viewtopic?

edit;

heb 't al op een andere manier gefixed.

Re: Nieuwe button

Geplaatst: 07 apr 2009 20:37
door T3KN0B0Y
kunnen we ook de posting buttons ( <!-- INCLUDE posting_buttons.html --> ) verbergen in een bepaald forum gedeelte?

Re: Nieuwe button

Geplaatst: 07 apr 2009 21:48
door Raimon
Dan kan je het volgende gebruiken :

Code: Selecteer alles

<!-- IF FORUM_ID != 2 -->
       <!-- INCLUDE posting_buttons.html -->
<!-- ENDIF -->

Re: Nieuwe button

Geplaatst: 07 apr 2009 22:46
door T3KN0B0Y
ik bedoel verbergen he, mag dit ook?

<!-- IF not FORUM_ID != 2 -->
<!-- INCLUDE posting_buttons.html -->
<!-- ENDIF -->

edit;

dat werkt niet helaas.

<!-- IF FORUM_ID != 2 -->
<!-- INCLUDE posting_buttons.html -->
<!-- ENDIF -->

werkt

alleen krijgt ie beetje fouten op de pagina in internet explorer hehe, is daar ook wat voor?

Re: Nieuwe button

Geplaatst: 07 apr 2009 23:22
door Raimon
!= is hetzelfde als not ;)
En de fouten met IE , waarschijnlijk veroorzaakt door javascript, kan je eens je posting_buttons.html plaatsen hier , of via de pastebin ?

Re: Nieuwe button

Geplaatst: 22 jun 2017 12:36
door T3KN0B0Y

Code: Selecteer alles

<tr valign="middle" align="{S_CONTENT_FLOW_BEGIN}">
	<td colspan="2">
		<script type="text/javascript">
		// <![CDATA[
		
		// Define the bbCode tags
		var bbcode = new Array();
		var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','
','
  • ','
','
  • ','
','Afbeelding','','','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
var imageTag = false;

// Helpline messages
var help_line = {
b: '{LA_BBCODE_B_HELP}',
i: '{LA_BBCODE_I_HELP}',
u: '{LA_BBCODE_U_HELP}',
q: '{LA_BBCODE_Q_HELP}',
c: '{LA_BBCODE_C_HELP}',
l: '{LA_BBCODE_L_HELP}',
o: '{LA_BBCODE_O_HELP}',
p: '{LA_BBCODE_P_HELP}',
w: '{LA_BBCODE_W_HELP}',
s: '{LA_BBCODE_S_HELP}',
f: '{LA_BBCODE_F_HELP}',
e: '{LA_BBCODE_E_HELP}',
d: '{LA_BBCODE_D_HELP}',
t: '{LA_BBCODE_T_HELP}',
tip: '{L_STYLES_TIP}'
<!-- BEGIN custom_tags -->
,cb_{custom_tags.BBCODE_ID}: '{custom_tags.A_BBCODE_HELPLINE}'
<!-- END custom_tags -->
}

// ]]>
</script>
<script type="text/javascript" src="{T_TEMPLATE_PATH}/editor.js"></script>

<!-- IF S_BBCODE_ALLOWED -->
<input type="button" class="btnbbcode" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" onmouseout="helpline('tip')" />
<input type="button" class="btnbbcode" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" onmouseout="helpline('tip')" />
<input type="button" class="btnbbcode" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" onmouseout="helpline('tip')" />
<!-- IF S_BBCODE_QUOTE -->
<input type="button" class="btnbbcode" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" onmouseout="helpline('tip')" />
<!-- ENDIF -->
<input type="button" class="btnbbcode" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" onmouseout="helpline('tip')" />
<input type="button" class="btnbbcode" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" onmouseout="helpline('tip')" />
<input type="button" class="btnbbcode" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" onmouseout="helpline('tip')" />
<input type="button" class="btnbbcode" accesskey="t" name="addlitsitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" onmouseover="helpline('e')" onmouseout="helpline('tip')" />
<!-- IF S_BBCODE_IMG -->
<input type="button" class="btnbbcode" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" onmouseout="helpline('tip')" />
<!-- ENDIF -->
<!-- IF S_LINKS_ALLOWED -->
<input type="button" class="btnbbcode" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" onmouseout="helpline('tip')" />
<!-- ENDIF -->
<!-- IF S_BBCODE_FLASH -->
<input type="button" class="btnbbcode" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" onmouseover="helpline('d')" onmouseout="helpline('tip')" />
<!-- ENDIF -->
<span class="genmed nowrap">{L_FONT_SIZE}: <select class="gensmall" name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" onmouseover="helpline('f')" onmouseout="helpline('tip')">
<option value="50">{L_FONT_TINY}</option>
<option value="85">{L_FONT_SMALL}</option>
<option value="100" selected="selected">{L_FONT_NORMAL}</option>
<option value="150">{L_FONT_LARGE}</option>
<option value="200">{L_FONT_HUGE}</option>
</select></span>
<!-- ENDIF -->
</td>
</tr>
<!-- IF S_BBCODE_ALLOWED and .custom_tags -->
<tr valign="middle" align="{S_CONTENT_FLOW_BEGIN}">
<td colspan="2">
<!-- BEGIN custom_tags -->
<input type="button" class="btnbbcode" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})"<!-- IF custom_tags.BBCODE_HELPLINE !== '' --> onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" onmouseout="helpline('tip')"<!-- ENDIF --> />
<!-- END custom_tags -->
</td>
</tr>
<!-- ENDIF -->
<!-- IF S_BBCODE_ALLOWED -->
<tr>
<td<!-- IF $S_SIGNATURE or S_EDIT_DRAFT --> colspan="2"<!-- ENDIF -->><input type="text" readonly="readonly" name="helpbox" style="width:100%" class="helpline" value="{L_STYLES_TIP}" /></td>
<!-- IF not $S_SIGNATURE and not S_EDIT_DRAFT -->
<td class="genmed" align="center">{L_FONT_COLOR}</td>
<!-- ENDIF -->
</tr>
<!-- ENDIF -->
[/code]

posting_buttons.html

heb 't trouwens ook met de officiele posting_buttons.html uit het phpBB3.0.4. pakket.