Quick Question

Started by mattchewone, May 02, 2009, 03:55:47 PM

Previous topic - Next topic

mattchewone

Would you be extremely kind as to also run through how i would run the category install please.
Also where do i need to place the files listed above can you please say which directory please as i dont want to put them in to the wrong place.

Many Thanks
Matt

SoLoGHoST

Ok, did all of the file edits for you.  File attached.  Unzip, and all files need to be overwritten and placed into the following folders exactly relative to your SMF Root Directory where SSI.php is located.

Once you overwrite/upload all of the files located in here to your server.  You should also have categoryinstall.php on your server in the same place where SSI.php is located (SMF Root Directory).  Now after you have copied/overwritten all of the files, Open up your Browser and type in the URL you would normally type in as your forums home page, but instead of index.php loading change this so it says categoryinstall.php and hit the enter key.  The page will load as a blank page.  After it loads (should be really quick), delete the file "categoryinstall.php" from your SMF Root Directory where SSI.php is located (you no longer need this file).

Last but not least, go to Admin->Forum Maintenance->Routine->Empty the file cache and click on the "Run Task now" button.

Ok, please note that I haven't did the index.php edit other than the 1 I uploaded prior to this post in this topic.  So if you need me to do this edit again for index.php, I will, otherwise you'll want to use the index.php I uploaded before.

Ok, That's it, follow instructions carefully and all will be fine :)

mattchewone

#42
Done it all.

Works wonderful the only issue i have is that my PortaMX panels are being displayed in the category view which i do not want how can i stop them from being displayed. I have already gone through the settings and they are only meant to be displayed on the frontpage.

I have attached an image to show you what i mean, i think it might be because the category mod is linked the the home tab which on my forum is being used by PortaMX a portal mod, which is why the panels are being displayed. Is there a way to edit this?

SoLoGHoST

#43
There should be a setting within your PortaMX Admin Settings to not show the Panels... I would check the Admin Settings in your PortaMX Options.  Ok, sorry, just reading that you already checked the settings and only show on the front page.  Ok, this may be a problem, but I will look into this more deeply tonight (if I find the time, hopefully).

Ok, I see what you mean about the Home Tab.  Give me a little time, will fix it for ?action=forum;category=2.  Gotta do some stuff right now. 

Will try and have it all worked out by tonight. :)

SoLoGHoST

#44
Ok, haven't tested this, quick fix, I think....

Open up ./Sources/Subs.php

FIND:
elseif ($context['current_action'] == 'search2')
$current_action = 'search';


AFTER ADD:

elseif ($context['current_action'] == 'catview')
$current_action = 'forum';


Overwrite the Category.php file in ./Sources/Category.php with the one attached here...

Let me know if this fixes it.  If so, I'll update the MOD right away with this.  Not sure, but this may also fix the PortaMX panels from being there.

Again, if you want I can do the edit for you.

Thank You!

SoLoGHoST

Hello again matt, just checking and did a fresh install of SMF 2.0 RC1 and I don't see the FORUM menu on there by default.  What MOD did you install that installed the FORUM Menu??  Perhaps this came with PortaMX?  In this case, I will have to take a look at the PortaMX Edits and files and will need to edit these files.  This is not my MOD, but I'll attempt to do this anyways.

So will hopefully have an answer for you soon on this...

mattchewone

I am at work at the moment so i will test it when i get home.

Yes the PortaMX changed the Home tab and added a Forum tab.

Thank you

SoLoGHoST

TRY THIS EDIT FIRST and SEE IF THIS FIXES IT, IF NOT THEN DO THE EDITS in the prior post, k?

In ./Sources/PortaMX/PortaMX.php

FIND (near or on line 141): // check all the actions and mutch more...
  if(empty($_REQUEST['action']) && empty($_REQUEST['board']) && empty($_REQUEST['topic']) && empty($_REQUEST['project']) && empty($_REQUEST['issue']))


REPLACE WITH: // check all the actions and mutch more...
  if(empty($_REQUEST['action']) && empty($_REQUEST['board']) && empty($_REQUEST['category']) && empty($_REQUEST['topic']) && empty($_REQUEST['project']) && empty($_REQUEST['issue']))



Ok, Haven't tested this out but 90% sure that this will fix your problem with PortaMX panels showing up.

mattchewone

#48
Quote from: SoLoGHoST on May 13, 2009, 03:43:04 AM
TRY THIS EDIT FIRST and SEE IF THIS FIXES IT, IF NOT THEN DO THE EDITS in the prior post, k?

In ./Sources/PortaMX/PortaMX.php

FIND (near or on line 141): // check all the actions and mutch more...
  if(empty($_REQUEST['action']) && empty($_REQUEST['board']) && empty($_REQUEST['topic']) && empty($_REQUEST['project']) && empty($_REQUEST['issue']))


REPLACE WITH: // check all the actions and mutch more...
  if(empty($_REQUEST['action']) && empty($_REQUEST['board']) && empty($_REQUEST['category']) && empty($_REQUEST['topic']) && empty($_REQUEST['project']) && empty($_REQUEST['issue']))



Ok, Haven't tested this out but 90% sure that this will fix your problem with PortaMX panels showing up.

Just tested this and it doesnt work. I will try the other EDIT not sure if i should try it with the current edit or not. Ill try it any way.

Just tried both edits, neither work.

SoLoGHoST

#49
Ok, Sorry for the delay.  Haven't had much time to do much of anything lately.  But I did install PortaMX and figured out how to remove the Panels from the Category (tho the Home Link still gets activated :()


I'm done with trying to make this MOD compatible with PortaMX, Sorry, just that PortaMX is VERY INVOLVED and gives me a huge headache when looking through all of their code.  So, although this will work, this will generate errors (undefined variables only viewable in the Admin->Errors Log whenever someone clicks on a Category Link).  So, if you are not afraid of errors (undefined variables) popping up in your Admin->Error Log (which is the only place they show up) than you can do the following EDITS:

1. Open:   ./index.php

FIND:
if(!defined('PortaMx'))
PortaMx();


REPLACE WITH:
if (!isset($_REQUEST['category'])) {
if(!defined('PortaMx'))
PortaMx();
}



2. Open: ./Sources/Load.php

FIND:
//-> start change PortaMx
// Build up the linktree.
$context['linktree'] = array_merge(
$context['linktree'],
array(array(
'url' => $scripturl . '?action=forum;#c' . $board_info['cat']['id'],
//-> end change PortaMx


REPLACE WITH:
//-> start change PortaMx
// Build up the linktree.
$context['linktree'] = array_merge(
$context['linktree'],
array(array(
'url' => $scripturl . '?category=' . $board_info['cat']['id'],
//-> end change PortaMx



3. Open:  ./Sources/Subs.php

FIND:
//-> start change PortaMx
foreach(array_reverse($context['template_layers']) as $layer)
{
getTemplateLayer($layer);
loadSubTemplate($layer . '_below', true);
}
//-> end change PortaMx


REPLACE WITH:
//-> start change PortaMx with Category View
if(!defined('PortaMx')) {
foreach(array_reverse($context['template_layers']) as $layer)
{
getTemplateLayerCat('notportamx');
loadSubTemplate($layer . '_below', true);
}
} else {
foreach(array_reverse($context['template_layers']) as $layer)
{
getTemplateLayer($layer);
loadSubTemplate($layer . '_below', true);
}
}
//-> end change PortaMx with Category View


FIND:
// Generate a random seed and ensure it's stored in settings.

BEFORE, ADD:

function getTemplateLayerCat($layer = '')
{
global $context;

if($layer == 'notportamx')
{
if(count($context['template_layers']) == 1)
$context['template_layers'] = array();
}
}



4. Open:  ./Themes/default/languages/Modifications.english.php

FIND:
?>

BEFORE, ADD:
$txt['forum'] = 'Forum';


Empty your File Cache (Admin->Maintenance->Forum Maintenance->Routine->Empty the file cache and click the Run task now button).

Ok, and That's It Bro.  I'm done with this.  Will generate undefined errors that only you can see as the Admin.  Sorry, but I've got a splitting migraine trying to make this work with the PortaMX, since the PortaMX tries to control EVERYTHING on your SMF board and even attempting to gain control back (through code) was a huge mission.  Well, use it or don't.  I just hate to see all of the time I spent on this go to waste, but in the end it's your call.

Was a pleasure working with you :)
Good Luck!

P.S. -> If you are done with this topic, can you please mark it solved.  Thank You :)

mattchewone

No thank you very much i will definatly use this and i will edit the code when i get home.

Thank you ever so much. I would love for you to take a look at my site once i have done this and tell me what you think.

Sorry for being a huge pain, i hope i havent caused you too much trouble i am very thankful for everything you have done!

Matt

SoLoGHoST

Have been to your forum already, looks nice :)  Have you checked out Graphics Mayhem yet? hmmmm  ::)

mattchewone

I have had a quick look, hopefully i'll get a chance to take a look over the weekend, i do need some things to spice up the site

mattchewone

Hi Solomon, sorry but i have only just been able to do this edits and i got this when i did them

Parse error: syntax error, unexpected ';', expecting ')' in /home/matthew09/SMF/www/Sources/Load.php on line 779

Could you please tell me what i need to do to fix this. I have kept the other edits, i have returned the Load.php back to its original state, the edits have worked wonderful although the forum tab next to the home tab has dissappeared when in the category view.

Thanks
Matt

SoLoGHoST

#54
Quote from: mattchewone on May 18, 2009, 05:46:39 AM
Hi Solomon, sorry but i have only just been able to do this edits and i got this when i did them

Parse error: syntax error, unexpected ';', expecting ')' in /home/matthew09/SMF/www/Sources/Load.php on line 779

Could you please tell me what i need to do to fix this. I have kept the other edits, i have returned the Load.php back to its original state, the edits have worked wonderful although the forum tab next to the home tab has dissappeared when in the category view.

Thanks
Matt

If you upload your Load.php, I'll take a look at it for you and see what's going on, k?

Also, make sure you have added the Modifications.english.php code (last 1 in there) and then clear your forums cache as mentioned.  This should add the "Forum" menu link up top :)

mattchewone

Sorry i have been busy Solomon,

here is my Load.php

Thank you very much for everything!

SoLoGHoST

Ok, have taken a look at it and I'm sorry, I don't see the problem right off the bat.  But remember these errors will show up, as long as they don't show up for the users viewing your forum.  PortaMX is not my MOD, and from what I can gather it is leaching your entire forum into this MOD.  So, sorry about your problem with line 776 in Load.php, but it looks fine to me.

Well, sorry I couldn't help much on this 1.  Good Luck!

Advertisement: