Fehler bei weblink MOD [erledigt]

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
Benutzeravatar
Prometeus
Mitglied
Beiträge: 371
Registriert: 01.07.2005 11:07

Fehler bei weblink MOD [erledigt]

Beitrag 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
Zuletzt geändert von Prometeus am 27.02.2006 16:46, insgesamt 4-mal geändert.
Benutzeravatar
Prometeus
Mitglied
Beiträge: 371
Registriert: 01.07.2005 11:07

Beitrag 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.
Benutzeravatar
Prometeus
Mitglied
Beiträge: 371
Registriert: 01.07.2005 11:07

Beitrag von Prometeus »

*schieb*
Benutzeravatar
ATARI
Mitglied
Beiträge: 1684
Registriert: 22.02.2004 16:51
Wohnort: Monaco Di Bavaria

Beitrag 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;
Man soll aufhören wenn´s am schönsten ist!

Servus phpBB! ;)
Benutzeravatar
Prometeus
Mitglied
Beiträge: 371
Registriert: 01.07.2005 11:07

Beitrag von Prometeus »

Nein, hat leider beides nicht richtig geholfen...
Ob das überhaupt an der posting.php liegt??? :oops:
Benutzeravatar
ATARI
Mitglied
Beiträge: 1684
Registriert: 22.02.2004 16:51
Wohnort: Monaco Di Bavaria

Beitrag von ATARI »

aja, der code von der viewforum_body.tpl hilft da wenig.
den code der posting_body.tpl bitte posten / verlinken.
Man soll aufhören wenn´s am schönsten ist!

Servus phpBB! ;)
Benutzeravatar
Prometeus
Mitglied
Beiträge: 371
Registriert: 01.07.2005 11:07

Beitrag 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

:-)
Benutzeravatar
Prometeus
Mitglied
Beiträge: 371
Registriert: 01.07.2005 11:07

Beitrag von Prometeus »

*schieb, denn ich brauch wirklich Hilfe!* :oops:
Benutzeravatar
Prometeus
Mitglied
Beiträge: 371
Registriert: 01.07.2005 11:07

Beitrag 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ß
Antworten

Zurück zu „phpBB 2.0: Mod Support“