Seite 1 von 1

Fehler bei weblink MOD [erledigt]

Verfasst: 21.02.2006 17:01
von Prometeus
Hallo,

ich habe den weblink mod von phpbb.de eingebaut wobei mir in meinem Postingbereich folgendes erscheint...

-------------------------------------------
[ externes Bild ]
-------------------------------------------
Ihr seht die Auswahloption: Normal, Wichtig; Ank�ndigung, Globale Ank�ndigung und Weblink sind wild gew�rfelt...

Mein viewform_body.tpl sieht an dieser Stelle so aus...

Code: Alles auswählen

<!-- BEGIN topicrow -->
	<tr> 
	  <td class="row1" align="center" valign="middle" width="20"><img src="{topicrow.TOPIC_FOLDER_IMG}" width="19" height="18" alt="{topicrow.L_TOPIC_FOLDER_ALT}" title="{topicrow.L_TOPIC_FOLDER_ALT}" /></td>
	  <td class="row1" width="100%">
	  	<span class="topictitle">{topicrow.NEWEST_POST_IMG}{topicrow.TOPIC_ATTACHMENT_IMG}{topicrow.TOPIC_TYPE}
	  	<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>{row.topicrow.TOPIC_EDIT}</span>
	  	<span class="gensmall"><br />{topicrow.GOTO_PAGE}</span></td>
	  <td class="row2" align="center" valign="middle"><span class="postdetails">{topicrow.REPLIES}</span></td>
	  <td class="row3" align="center" valign="middle"><span class="name">{topicrow.TOPIC_AUTHOR}</span></td>
	  <td class="row2" align="center" valign="middle"><span class="postdetails">{topicrow.VIEWS}</span></td>
	  <td class="row3Right" align="center" valign="middle" nowrap="nowrap"><span class="postdetails">{topicrow.LAST_POST_TIME}<br />{topicrow.LAST_POST_AUTHOR} {topicrow.LAST_POST_IMG}</span></td>
	</tr>
	<!-- END topicrow -->
Ich habe sowohl ein funktionierenden global announce Mod drin und nunmehr ein Beitrag-als-Weblink-Mod installiert.

Seitdem habe ich das Problem und kriege es beim besten Willen nicht weg.

Meine modifizierte Posting.php sieht wie folgt aus

Code: Alles auswählen

//
// What auth type do we need to check?
//
$is_auth = array();
switch( $mode )
{
	case 'newtopic':	
		
		if ( $topic_type == POST_GLOBAL_ANNOUNCE ) 
		{
		$is_auth_type = 'auth_globalannounce'; 
		}
		else if ( $topic_type == POST_ANNOUNCE )
			{
			$is_auth_type = 'auth_announce';
		}
				else if ( $topic_type == POST_STICKY )
		{
			$is_auth_type = 'auth_sticky';
		}
		
			else if ( $topic_type == POST_TITLE_LINK )
		{
			$is_auth_type = 'auth_post';
		}
		else
		{
			$is_auth_type = 'auth_post';
		}
		break;
Habe ich hier irgendwo einen Fehler gemacht?
Ich bin die genaue (recht kurze) Bauanleitung f�r den weblinkmod mehrmals durchgegangen und habe kein Fehler entdecken k�nnen.

Aktuell l�sst sich Wichtig und Ank�ndigung nicht mehr ausw�hlen.. :oops:

Kann mir bitte jemand helfen?
Danke

Verfasst: 23.02.2006 21:41
von Prometeus
Brauche wirklich dringen HILFE!
Hat vielleicht doch jemand einen Hinweis für mich?
Würde diesen Mod gerne behalten, was bei dem Fehler aber kaum machbar ist und ich finden den Fehler einfach nicht.

Verfasst: 24.02.2006 09:00
von Prometeus
*schieb*

Verfasst: 24.02.2006 09:05
von ATARI
keine ahnung, so vllt.?

Code: Alles auswählen

// 
// What auth type do we need to check? 
// 
$is_auth = array(); 
switch( $mode ) 
{ 
   case 'newtopic':    
       
      if ( $topic_type == POST_GLOBAL_ANNOUNCE ) 
      { 
      $is_auth_type = 'auth_globalannounce'; 
      } 
      else if ( $topic_type == POST_ANNOUNCE ) 
         { 
         $is_auth_type = 'auth_announce'; 
      } 
            else if ( $topic_type == POST_STICKY ) 
      { 
         $is_auth_type = 'auth_sticky'; 
      } 
       
         else if ( $topic_type == POST_TITLE_LINK ) 
      { 
         $is_auth_type = 'auth_titlelink'; 
      } 
      else 
      { 
         $is_auth_type = 'auth_post'; 
      } 
      break;

oder so?!?

Code: Alles auswählen

// 
// What auth type do we need to check? 
// 
$is_auth = array(); 
switch( $mode ) 
{ 
   case 'newtopic':    
       
      if ( $topic_type == POST_GLOBAL_ANNOUNCE ) 
      { 
      $is_auth_type = 'auth_globalannounce'; 
      } 
      else if ( $topic_type == POST_ANNOUNCE ) 
         { 
         $is_auth_type = 'auth_announce'; 
      } 
            else if ( $topic_type == POST_STICKY ) 
      { 
         $is_auth_type = 'auth_sticky'; 
      } 
       
         else if ( $topic_type == POST_TITLE_LINK ) 
      { 
         $is_auth_type = 'auth_title_link'; 
      } 
      else 
      { 
         $is_auth_type = 'auth_post'; 
      } 
      break;

Verfasst: 24.02.2006 11:17
von Prometeus
Nein, hat leider beides nicht richtig geholfen...
Ob das überhaupt an der posting.php liegt??? :oops:

Verfasst: 24.02.2006 12:22
von ATARI
aja, der code von der viewforum_body.tpl hilft da wenig.
den code der posting_body.tpl bitte posten / verlinken.

Verfasst: 25.02.2006 11:13
von Prometeus
Hmm, da sieht allerdings alles ordenltich aus.
Hier der wohl entscheidene Auszug...

Code: Alles auswählen

 <!-- BEGIN switch_notify_checkbox -->
		  <tr> 
			<td> 
			  <input type="checkbox" name="notify" {S_NOTIFY_CHECKED} />
			</td>
			<td><span class="gen">{L_NOTIFY_ON_REPLY}</span></td>
		  </tr>
		  <!-- END switch_notify_checkbox -->
		  <!-- BEGIN switch_delete_checkbox -->
		  <tr> 
			<td> 
			  <input type="checkbox" name="delete" />
			</td>
			<td><span class="gen">{L_DELETE_POST}</span></td>
		  </tr>
		  <!-- END switch_delete_checkbox -->
		  <!-- BEGIN switch_type_toggle -->
		  <tr> 
			<td></td>
			<td><span class="gen">{S_TYPE_TOGGLE}</span></td>
		  </tr>
		  <!-- END switch_type_toggle -->
		</table>
	  </td>
	</tr>
	{ATTACHBOX}{POLLBOX} 
Die ganze Datei gibt es hier

Danke

:-)

Verfasst: 27.02.2006 13:50
von Prometeus
*schieb, denn ich brauch wirklich Hilfe!* :oops:

Verfasst: 27.02.2006 16:46
von Prometeus
OK, trotz dem Fakt, dass ich gerade mal html mehr laienhaft als alles andere beherrsche hab ichs tatsächlich hinbekommen.

Der entscheidene Passus ist folgender:

Code: Alles auswählen

//
// Topic type selection
//
$topic_type_toggle = '';
if ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] ) )
{
  $template->assign_block_vars('switch_type_toggle', array());

  $topic_type_toggle .= '<select name="topictype">';
  
  $topic_type_toggle .= '<option value="'. POST_NORMAL .'"' . ( ( $post_data['topic_type'] == POST_NORMAL || $topic_type == POST_NORMAL ) ? ' selected' : '' ) . '>'. $lang['Post_Normal'] .'</option>'; 
  $topic_type_toggle .= '<option value="'. POST_STICKY .'"' . ( ( $post_data['topic_type'] == POST_STICKY || $topic_type == POST_STICKY ) ? ' selected' : '' ) . '>'. $lang['Post_Sticky'] .'</option>';
  $topic_type_toggle .= '<option value="'. POST_ANNOUNCE .'"' . ( ( $post_data['topic_type'] == POST_ANNOUNCE || $topic_type == POST_ANNOUNCE ) ? ' selected' : '' ) . '>'. $lang['Post_Announcement'] .'</option>';
  $topic_type_toggle .= '<option value="'. POST_TITLE_LINK .'"' . ( ( $post_data['topic_type'] == POST_TITLE_LINK || $topic_type == POST_TITLE_LINK ) ? ' selected' : '' ) . '>'. $lang['Post_Weblink'] .'</option>';
  
  // Start add - weblink MOD
  if( ( $userdata['user_level'] == ADMIN || $userdata['user_level'] == MOD ) && $is_auth['auth_post'] )
	{
		$topic_type_toggle .= '<input type="radio" name="topictype" value="' . POST_TITLE_LINK . '"';
		if ( $post_data['topic_type'] == POST_TITLE_LINK || $topic_type == POST_TITLE_LINK )
		{
			$topic_type_toggle .= ' checked="checked"';
		}
		$topic_type_toggle .= ' /> ' . $lang['Post_Weblink'] . '&nbsp;&nbsp;';
	}
  // End add - weblink MOD
    // Start add - Global announcement MOD
		if( $is_auth['auth_globalannounce'] ) 
		{ 
   $topic_type_toggle .= '<input type="radio" name="topictype" value="' . POST_GLOBAL_ANNOUNCE . '"'; 
   if ( $post_data['topic_type'] == POST_GLOBAL_ANNOUNCE || $topic_type == POST_GLOBAL_ANNOUNCE ) 

   if ( $post_data['topic_type'] == POST_GLOBAL_ANNOUNCE ) 
   { 
      $topic_type_toggle .= ' checked="checked"'; 
   } 
   $topic_type_toggle .= ' /> ' . $lang['Post_global_announcement'] . '&nbsp;&nbsp;'; 
} 
// End add - Global announcement MOD
  }


$hidden_form_fields = '<input type="hidden" name="mode" value="' . $mode . '" />';
So läufts. Danke an alle die geholfen haben.
Gruß