Yellow Card Mod - Changes for Morpheus(X)

Specific instructions on how to apply certain mods to certain styles.

Moderator: Moderators

Postby UseLess on Wed Jun 15, 2005 4:59 pm

Greetings,

You inserted the code in the middle of a line an deleted part of it, this is what you should have;

Code: Select all
//
// User authorisation levels output
//
$s_auth_can = ( ( $is_auth['auth_post'] ) ? $lang['Rules_post_can'] : $lang['Rules_post_cannot'] ) . '<br />';
$s_auth_can .= ( ( $is_auth['auth_reply'] ) ? $lang['Rules_reply_can'] : $lang['Rules_reply_cannot'] ) . '<br />';
$s_auth_can .= ( ( $is_auth['auth_edit'] ) ? $lang['Rules_edit_can'] : $lang['Rules_edit_cannot'] ) . '<br />';
$s_auth_can .= ( ( $is_auth['auth_delete'] ) ? $lang['Rules_delete_can'] : $lang['Rules_delete_cannot'] ) . '<br />';
$s_auth_can .= ( ( $is_auth['auth_vote'] ) ? $lang['Rules_vote_can'] : $lang['Rules_vote_cannot'] ) . '<br />';
$s_auth_can .= ( $is_auth['auth_ban'] ) ? $lang['Rules_ban_can'] . "<br />" : "";
$s_auth_can .= ( $is_auth['auth_greencard'] ) ? $lang['Rules_greencard_can'] . "<br />" : "";
$s_auth_can .= ( $is_auth['auth_bluecard'] ) ? $lang['Rules_bluecard_can'] . "<br />" : "";
attach_build_auth_levels($is_auth, $s_auth_can);
Movie Quote:
It's not the years honey, it's the mileage...

I do not provide any install services for phpBB, Mods or Styles.
Please do not pm me for support/scripting help - you won't get any reply. If you have a question then make a post in the appropriate forum.
User avatar
UseLess
Registered User
Registered User
 
Posts: 6220
Joined: Mon Sep 27, 2004 2:14 am
Location: North East, UK

Postby Hellkeepa on Wed Jun 15, 2005 5:12 pm

HELLo!

yeah, gave it a second look at and spotted what the real error was. Sorry for missing it the first time though, should have seen it the first time around.
Anyway, the problem was that you've pasted the lines from "auth_ban" to "auth_bluecard" in the middle of another line, thus causing the above problems. I've sorted it out now, but had to guess on the output of those three conditional statements returned false (the "_cannot" parts).
Code: Select all
<?
// 
// User authorisation levels output 
// 
$s_auth_can = ( ( $is_auth['auth_post'] ) ? $lang['Rules_post_can'] : $lang['Rules_post_cannot'] ) . '<br />'; 
$s_auth_can .= ( ( $is_auth['auth_reply'] ) ? $lang['Rules_reply_can'] : $lang['Rules_reply_cannot'] ) . '<br />'; 
$s_auth_can .= ( ( $is_auth['auth_edit'] ) ? $lang['Rules_edit_can'] : $lang['Rules_edit_cannot'] ) . '<br />'; 
$s_auth_can .= ( ( $is_auth['auth_delete'] ) ? $lang['Rules_delete_can'] : $lang['Rules_delete_cannot'] ) . '<br />'; 
$s_auth_can .= ( ( $is_auth['auth_vote'] ) ? $lang['Rules_vote_can'] : $lang['Rules_vote_cannot'] ) . '<br />';
$s_auth_can .= ( $is_auth['auth_ban'] ) ? $lang['Rules_ban_can'] : $lang['Rules_ban_cannot'] . '<br />'; 
$s_auth_can .= ( $is_auth['auth_greencard'] ) ? $lang['Rules_greencard_can'] : $lang['Rules_greencard_cannot'] . '<br />'; 
$s_auth_can .= ( $is_auth['auth_bluecard'] ) ? $lang['Rules_bluecard_can'] : $lang['Rules_bluecard_cannot'] . '<br />' : '';
attach_build_auth_levels($is_auth, $s_auth_can);


Edit, added:
Hehe, seems as if we fixed this at the same time. :p A bit different from eachother though, but choose the solution that works for you.

Happy fraggin'!
Hellkeepa
Registered User
Registered User
 
Posts: 36
Joined: Mon Apr 11, 2005 2:57 am

Postby mikecp421 on Wed Jun 15, 2005 5:43 pm

ok thats good now, what about this one.

Parse error: parse error, unexpected ';' in /www/m/meogeecom/htdocs/viewforum.php on line 366
User avatar
mikecp421
Registered User
Registered User
 
Posts: 431
Joined: Sun Apr 17, 2005 12:18 am
Location: New York

Postby mikecp421 on Wed Jun 15, 2005 5:46 pm

ok and I got this in the Admin Control panel too

Parse error: parse error, unexpected '}' in /www/m/meogeecom/htdocs/admin/admin_users.php on line 1078
User avatar
mikecp421
Registered User
Registered User
 
Posts: 431
Joined: Sun Apr 17, 2005 12:18 am
Location: New York

Postby mikecp421 on Wed Jun 15, 2005 5:50 pm

[quote user="mikecp421" post="39795"]ok and I got this in the Admin Control panel too

Parse error: parse error, unexpected '}' in /www/m/meogeecom/htdocs/admin/admin_users.php on line 1078[/quote]

Forget it I fixed that it was an useless {else} thingy! Wow I fixed something on my own, before you know it I will be writing stuff! lol I really appreciate this help guys! Thanks
User avatar
mikecp421
Registered User
Registered User
 
Posts: 431
Joined: Sun Apr 17, 2005 12:18 am
Location: New York

Postby mikecp421 on Wed Jun 15, 2005 6:00 pm

so theres the one abouve and this one now and they are both related to this code you are giving me. I am doing something wrong maybe??

Parse error: parse error, unexpected ':' in /www/m/meogeecom/htdocs/viewtopic.php on line 539

from above;

Parse error: parse error, unexpected ';' in /www/m/meogeecom/htdocs/viewforum.php on line 366
User avatar
mikecp421
Registered User
Registered User
 
Posts: 431
Joined: Sun Apr 17, 2005 12:18 am
Location: New York

Postby UseLess on Wed Jun 15, 2005 6:09 pm

Greetings,

Use the code from my post above as it's taken from a working file with that mod installed.

And from the code above posted by hellkeepa this is wrong;

[code start="12"]$s_auth_can .= ( $is_auth['auth_bluecard'] ) ? $lang['Rules_bluecard_can'] : $lang['Rules_bluecard_cannot'] . '<br />' : '';[/code]

it should be;

[code="12"]$s_auth_can .= ( $is_auth['auth_bluecard'] ) ? $lang['Rules_bluecard_can'] : $lang['Rules_bluecard_cannot'] . '<br />';[/code]

but then it's wrong anyway as the YCM does not use '_cannot' it just uses ''
Movie Quote:
It's not the years honey, it's the mileage...

I do not provide any install services for phpBB, Mods or Styles.
Please do not pm me for support/scripting help - you won't get any reply. If you have a question then make a post in the appropriate forum.
User avatar
UseLess
Registered User
Registered User
 
Posts: 6220
Joined: Mon Sep 27, 2004 2:14 am
Location: North East, UK

Postby mikecp421 on Wed Jun 15, 2005 6:10 pm

[quote user="mikecp421" post="39798"]
Parse error: parse error, unexpected ':' in /www/m/meogeecom/htdocs/viewtopic.php on line 539

[/quote] Ok entered both codes from above and useless gets me here; hellakeepa gets me the same error so I will use yours useless, thank you guys!

Parse error: parse error, unexpected '<' in /www/m/meogeecom/htdocs/cache/tpl_MorpheusXSteelBlue.viewtopic_body.php on line 68

I am checking to see what that is
User avatar
mikecp421
Registered User
Registered User
 
Posts: 431
Joined: Sun Apr 17, 2005 12:18 am
Location: New York

Postby mikecp421 on Wed Jun 15, 2005 6:13 pm

ok heres the line of text from that error, any ideas? Number 4 here is my line 68 FYI


Code: Select all
   // check for new post
   $new_post = strpos($postrow_item['MINI_POST_IMG'], '_new') > 0 ? true : false;
   $postrow_item['TPL_HDR1'] = $new_post ? $this->vars['TPL_HDR1_NEW'] : $this->vars['TPL_HDR1_POST'];
   $postrow_item['TPL_HDR2'] = $new_post ? $this->vars['TPL_HDR2_NEW'] : $this->vars['TPL_HDR2'];
   $postrow_item['TPL_FTR'] = $new_post ? $this->vars['TPL_FTR_NEW'] : $this->vars['TPL_FTR'];
   // set backgrounds
   $num = ($postrow_i % 2) + 1;
   $postrow_item['TPL_CLASS_POST'] = 'post' . $num;
   $postrow_item['TPL_CLASS_PROFILE'] = 'post-left' . $num;
   ob_start(); 
   ?>{postrow.ATTACHMENTS}<?php 
   $postrow_item['ATTACHMENTS'] = ob_get_contents(); 
   ob_end_clean(); 
}   
User avatar
mikecp421
Registered User
Registered User
 
Posts: 431
Joined: Sun Apr 17, 2005 12:18 am
Location: New York

Postby UseLess on Wed Jun 15, 2005 6:22 pm

Greetings,

In 'viewtopic_body.tpl' you should have this after {POLL_DISPLAY}

Code: Select all
<!-- BEGIN postrow -->
<?php

global $userdata, $board_config, $topic_id, $is_auth, $forum_topic_data, $lang, $phpEx;

if(!isset($can_reply))
{
   $can_reply = $this->style_config['quick_reply'] && $userdata['session_logged_in'] ? true : false;
   if($can_reply)
   {
      $is_auth_type = 'auth_reply';
      if(!$is_auth[$is_auth_type])
      {
         $can_reply = false;
      }
      elseif ( ($forum_topic_data['forum_status'] == FORUM_LOCKED || $forum_topic_data['topic_status'] == TOPIC_LOCKED) && !$is_auth['auth_mod'] )
      {
         $can_reply = false;
      }
   }
   if($can_reply)
   {
      $this->assign_block_vars('xs_quick_reply', array());
   }
}

$postrow_count = ( isset($this->_tpldata['postrow.']) ) ?  sizeof($this->_tpldata['postrow.']) : 0;
for ($postrow_i = 0; $postrow_i < $postrow_count; $postrow_i++)
{
   $postrow_item = &$this->_tpldata['postrow.'][$postrow_i];
   // set profile link and search button
   if(!empty($postrow_item['PROFILE']) && strpos($postrow_item['POSTER_NAME'], '<') === false)
   {
      $postrow_item['SEARCH_IMG2'] = str_replace('%s', htmlspecialchars($postrow_item['POSTER_NAME']), $postrow_item['SEARCH_IMG']);
      if($this->vars['TPL_CFG_TOPICVIEW'] !== 'hide')
      {
         $search = array($lang['Read_profile'], '<a ');
         $replace = array($postrow_item['POSTER_NAME'], '<a class="name" ');
         $postrow_item['POSTER_NAME'] = str_replace($search, $replace, $postrow_item['PROFILE']);
      }
   }

   // check for new post
   $new_post = strpos($postrow_item['MINI_POST_IMG'], '_new') > 0 ? true : false;
   $postrow_item['TPL_HDR1'] = $new_post ? $this->vars['TPL_HDR1_NEW'] : $this->vars['TPL_HDR1_POST'];
   $postrow_item['TPL_HDR2'] = $new_post ? $this->vars['TPL_HDR2_NEW'] : $this->vars['TPL_HDR2'];
   $postrow_item['TPL_FTR'] = $new_post ? $this->vars['TPL_FTR_NEW'] : $this->vars['TPL_FTR'];
   // set backgrounds
   $num = ($postrow_i % 2) + 1;
   $postrow_item['TPL_CLASS_POST'] = 'post' . $num;
   $postrow_item['TPL_CLASS_PROFILE'] = 'post-left' . $num;

   ob_start();     
?>
{postrow.ATTACHMENTS}
<?php     
   $postrow_item['ATTACHMENTS'] = ob_get_contents();     
   ob_end_clean();     
}   
?>
<!-- END postrow -->


Also if your referring to a particular line of code then use [ code start="<line numer>" highlight="<line number>"] (note you can use "3-5" to highlight lines 3 to 5 or use "3,5,7" to highlight lines 3,5 and 7 or a single line numder to highlight just one line) that way your code would look like this;

[code start="140" highlight="143"]$s_auth_can .= ( ( $is_auth['auth_vote'] ) ? $lang['Rules_vote_can'] : $lang['Rules_vote_cannot'] ) . '<br />';
$s_auth_can .= ( $is_auth['auth_ban'] ) ? $lang['Rules_ban_can'] : $lang['Rules_ban_cannot'] . '<br />';
$s_auth_can .= ( $is_auth['auth_greencard'] ) ? $lang['Rules_greencard_can'] : $lang['Rules_greencard_cannot'] . '<br />';
$s_auth_can .= ( $is_auth['auth_bluecard'] ) ? $lang['Rules_bluecard_can'] : $lang['Rules_bluecard_cannot'] . '<br />' : '';[/code]
Movie Quote:
It's not the years honey, it's the mileage...

I do not provide any install services for phpBB, Mods or Styles.
Please do not pm me for support/scripting help - you won't get any reply. If you have a question then make a post in the appropriate forum.
User avatar
UseLess
Registered User
Registered User
 
Posts: 6220
Joined: Mon Sep 27, 2004 2:14 am
Location: North East, UK

Postby mikecp421 on Wed Jun 15, 2005 6:32 pm

ok thanks for that useless, now the forum works fine, thank you! I copy you on that code start code too! One thing though, I dont see the ban buttons although it is available in the ACP to let moderators ban and unban, did I do something wrong somewhere?
User avatar
mikecp421
Registered User
Registered User
 
Posts: 431
Joined: Sun Apr 17, 2005 12:18 am
Location: New York

Postby mikecp421 on Wed Jun 15, 2005 6:40 pm

heres a pic of the mod in the ACP. I can see the buttons but I cant allow the use of them, you see how there isnt a drop down box for the new stuff??


Image
User avatar
mikecp421
Registered User
Registered User
 
Posts: 431
Joined: Sun Apr 17, 2005 12:18 am
Location: New York

Postby mikecp421 on Wed Jun 15, 2005 6:43 pm

ok I got the stuff on the posts but the pics arent showing at all and there is no ban button just a reactivate and a report. Ok I definitely have the right pics in the images file, but they areant associating with the threads, what do I do to fix that? The report a post works but no icon either. And no ban text or button just re-activate user text and report post.
User avatar
mikecp421
Registered User
Registered User
 
Posts: 431
Joined: Sun Apr 17, 2005 12:18 am
Location: New York

Postby UseLess on Wed Jun 15, 2005 7:04 pm

Greetings,

What permissions have you set at the forum level?

The images are assigned in the 'MorpheusX.cfg' file you should use the lines for this file supplied with the mod until you make the changes to make it suit the style.
Movie Quote:
It's not the years honey, it's the mileage...

I do not provide any install services for phpBB, Mods or Styles.
Please do not pm me for support/scripting help - you won't get any reply. If you have a question then make a post in the appropriate forum.
User avatar
UseLess
Registered User
Registered User
 
Posts: 6220
Joined: Mon Sep 27, 2004 2:14 am
Location: North East, UK

Postby mikecp421 on Wed Jun 15, 2005 7:19 pm

ok I went back and added the changes from your mod and I am waiting to see what happens. I apprently didnt have all your mods from your morpheus mod in there. I like this text editor thing.

Ok no pictures I got red X's.

What to do?
User avatar
mikecp421
Registered User
Registered User
 
Posts: 431
Joined: Sun Apr 17, 2005 12:18 am
Location: New York

PreviousNext

Return to How to mod some styles

Who is online

Users browsing this forum: No registered users and 1 guest