Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post Wanted: Help Testing And Debugging M2F 
 
I think I have gone as far as my web server allows me I would like some testing help and maybe some cleaning up.

I am working on porting M2F 1.2 stable release to Icy Phoenix.  At one juncture I had it working but with the changes in 1.3.0.53a I needed to rework it.

The package is already set up to drag and drop in a standard Icy Phoenix 1.3.0.53a  and almost all of my code has been marked so it's easy to see.

If I could get some feedback and a look at the code I would appreciate it.

Edit 12/02/2011 - new version uploaded with a few edits

ip_m2f.1.zip
Description: ip_m2f Conversion Alpha edit 1 
Download
Filename: ip_m2f.1.zip
Filesize: 924.28 KB
Downloaded: 89 Time(s)

 



 
Last edited by d16174l4n63l on Sat 12 Feb, 2011 19:25; edited 1 time in total 
d16174l4n63lSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: Wanted: Help Testing And Debugging M2F 
 
Here's a few things that popped up.

extension.inc is no longer used so you can remove all of those lines.

POSTS_TEXT_TABLE = POSTS_TABLE (So I believe).  

Edit: if you're wondering about the "Strange" path? The path \m2f-ip\m2f\m2f indicates that I'm only looking at this on a HD - NOT testing it.  

Code: [Download] [Hide] [Select]
\m2f-ip\m2f\m2f\m2f_admin.php (1 hits)
    Line 1206:                         FROM " . POSTS_TEXT_TABLE . " pt,

\m2f-ip\m2f\m2f\includes\insert_post.php (1 hits)
    Line 139:     $sql = "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text) VALUES ($post_id, '$subject', '$bbcode_uid', '$message')";


\m2f-ip\m2f\m2f_usercp.php (1 hits)
    Line 23: #include($phpbb_root_path . 'extension.inc');

\m2f-ip\m2f\adm\admin_m2f.php (3 hits)
    Line 34: #require($phpbb_root_path . 'extension.inc');
    Line 64:         #include_once($phpbb_root_path . 'extension.inc');
    Line 799:             include_once($phpbb_root_path . 'extension.inc');

\m2f-ip\m2f\m2f\m2f_import_msgs.php (1 hits)
    Line 33: include_once($phpbb_root_path . 'extension.inc');

\m2f-ip\m2f\m2f\admin\admin_m2f_standalone.php (1 hits)
    Line 371:                 include_once($phpbb_root_path . 'extension.inc');


Session management no longer uses "PAGES" etc.

Code: [Download] [Hide] [Select]
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_VIEWMEMBERS);
init_userprefs($userdata);


// Start session management
$userdata = session_pagestart($user_ip);
init_userprefs($userdata);
// End session management

 



 
Last edited by mort on Sat 12 Feb, 2011 11:29; edited 1 time in total 
mortSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Wanted: Help Testing And Debugging M2F 
 
here´s all important changes

Code: [Download] [Hide]
  1. define('IN_ICYPHOENIX', true); 
  2. if (!defined('IP_ROOT_PATH')) define('IP_ROOT_PATH', './'); 
  3. if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1)); 
  4. include(IP_ROOT_PATH . 'common.' . PHP_EXT); 
  5.  
  6. // Start session management 
  7. $userdata = session_pagestart($user_ip); 
  8. init_userprefs($userdata); 
  9. // End session management 


you´ll have to replace all $phpbb_root_path with IP_ROOT_PATH

and put the header of each file right
 




____________
Out of Order
 
spydieSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Wanted: Help Testing And Debugging M2F 
 
You also need to change these:  

Code: [Download] [Hide] [Select]
\m2f-ip\m2f\m2f\m2f_import_msgs.php (1 hits)
    Line 18: define('IN_PHPBB', true);

\m2f-ip\m2f\m2f\admin\admin_m2f_standalone.php (1 hits)
    Line 370:                 define('IN_PHPBB', TRUE);

To:

define('IN_ICYPHOENIX', true);

______________________________________________________________________

\m2f-ip\m2f\m2f_usercp.php (1 hits)
    Line 38:   redirect(append_sid("login.php?redirect=m2f_usercp.php", true));

  F:\m2f-ip\m2f\m2f\m2f_attachments.php (2 hits)
    Line 370:                // login.php?redirect=download.php?id=
    Line 372:                $url = $server_protocol . $server_name . $server_port . $script_path . "login.php?redirect=download.php?id=". $this->attach_id;


login.php = login_ip.php

____________________________________________________________________


\m2f-ip\m2f\includes\page_header.php (8 hits)
    Line 90: $page_url = pathinfo($_SERVER['PHP_SELF']);
    Line 135: $page_url = pathinfo($_SERVER['PHP_SELF']);
    Line 215:     $smart_redirect = strrchr(htmlentities(str_replace($pattern, $replace, htmlentities(stripslashes($_SERVER['PHP_SELF']), ENT_QUOTES))), '/');
    Line 217:     $smart_redirect = strrchr($_SERVER['PHP_SELF'], '/');
    Line 1274:     $path_parts = pathinfo($_SERVER['PHP_SELF']);
    Line 1360:         $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'] . (($_SERVER['QUERY_STRING'] != '') ? '?' . $_SERVER['QUERY_STRING'] : '');



Code: [Download] [Hide] [Select]
$_SERVER['PHP_SELF'] Is a vulnerability and open to hackers. = basename(_file_);


Try google this:
Code: [Download] [Hide] [Select]
$_SERVER['PHP_SELF'] Is a vulnerability


The list is getting too long -  

It would be better if you add the code changes you've made to the existing IP files, because I suspect that anyone who has a test site (like myself) is NOT going to overwrite existing core files (or rename them) just to test this thing, when they usually have other things installed (Code) that they are working on.
 



 
mortSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Wanted: Help Testing And Debugging M2F 
 
Code: [Download] [Hide] [Select]
login.php = IP_ROOT_PATH . 'login_ip.' . PHP_EXT;


@ mort

Let´s do the things right. like it is in all Icy code

Anyway, you might or should think about including crtracker in this files, and include this files in crtracker defines list
 




____________
Out of Order
 
spydieSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Wanted: Help Testing And Debugging M2F 
 
spydie wrote: [View Post]


@ mort

Let´s do the things right. like it is in all Icy code

IP_ROOT_PATH . 'login_ip.' . PHP_EXT;


Yes, that will work, but I didn't want to insult his intelligence because he obviously realises that some of these commands have been turned into constants.

All I was doing was pointing out some areas that needed to be addressed.


But if we're going to be "Picky",

FYI, login_ip.' . PHP_EXT = LOGIN_MG

As in these examples.

redirect(append_sid(LOGIN_MG . '?redirect=profile_main.' . PHP_EXT, true));
redirect(append_sid(LOGIN_MG . '?redirect=' . SEARCH_MG . '&search_id=newposts', true));

So "login_ip.' . PHP_EXT" also appears to be redundant?

And it appears that the same could be said for (search. ' . PHP_EXT = SEARCH_MG) - VIEWTOPIC_MG and a few others I noticed?
 



 
mortSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Wanted: Help Testing And Debugging M2F 
 
you´re right aswell.

Just wanted to point out, that he should try to keep the code as clean and comented as possible.

makes it easier, going for Bug haunting, and checking and understanding the script
 




____________
Out of Order
 
spydieSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Wanted: Help Testing And Debugging M2F 
 
You all are definitely right and I appreciate the prompt responses.  I apologize up front this is my first real attempt at putting this together since 1.3 changes so I may ask stupid questions I have no shame in saying I am a bit rusty on conversions like this.  I spent far too much time dealing with lua development recently.

The thing about this package is that is was initially wrapped tightly around phpbb2 fairly heavy.  Even following the install instructions only works so well.

I like the idea of including ctracker in this as well.

The core file adjustments can be found in ip_m2f/m2f/m2f_phpbb20x.txt  Only a couple adjustments need to be there in their instructions.  Such as the paths and what not.

Again thank you guys for your time.

What would be a good suggestion to edit in here
Code: [Download] [Hide] [Select]
\m2f-ip\m2f\m2f\m2f_admin.php (1 hits)
Line 1206: FROM " . POSTS_TEXT_TABLE . " pt,


Code: [Download] [Hide] [Select]
\m2f-ip\m2f\m2f\includes\insert_post.php (1 hits)
Line 139: $sql = "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text) VALUES ($post_id, '$subject', '$bbcode_uid', '$message')";


With these here I am just removing anything past the $user_ip right?
Code: [Download] [Hide] [Select]
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_VIEWMEMBERS);
init_userprefs($userdata);


// Start session management
$userdata = session_pagestart($user_ip);
init_userprefs($userdata);
// End session management


I did a little cleaning to the files, so that should take out a few things.  replaced the package in my first post.
 



 
d16174l4n63lSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Wanted: Help Testing And Debugging M2F 
 
Code: [Download] [Hide] [Select]
Line 139: $sql = "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text) VALUES ($post_id, '$subject', '$bbcode_uid', '$message')";


becomes

Code: [Download] [Hide] [Select]
Line 139: $sql = "INSERT INTO " . POSTS_TABLE . " (post_id, post_subject, bbcode_uid, post_text) VALUES ($post_id, '$subject', '$bbcode_uid', '$message')";


same would happen to . PRIVMSGS_TEXT_TABLE .

Would become .PRIVMSGS_TABLE .




a bit closer looking at the 1.3.0.53a core files, would help you a lot.

like replacing $phpEx with PHP_EXT
 




____________
Out of Order
 
spydieSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Wanted: Help Testing And Debugging M2F 
 
spydie wrote: 

Just wanted to point out, that he should try to keep the code as clean and comented as possible.


You were'nt pointing anything out to him, you were telling me how I should respond to his questions. And if you are going to correct someone, then you need to be sure too that your answer or advice is a 100% correct.

Because even this ->

IP_ROOT_PATH . 'login_ip.' . PHP_EXT;

does not require the URL path in front of login_ip or LOGIN_MG for that matter, neither is it wanted.

d16174l4n63l wrote: 


What would be a good suggestion to edit in here

\m2f-ip\m2f\m2f\m2f_admin.php (1 hits)
Line 1206: FROM " . POSTS_TEXT_TABLE . " pt,


Etc.......

I already answered that earlier with

POSTS_TEXT_TABLE = POSTS_TABLE

So that was a waste of time!

This also doesn't do very much to give me much confidence that this thing ever worked at all when you finished chopping it up?

http://www.icyphoenix.com/viewtopic.php?p=50685#p50685

d16174l4n63l wrote: 

Hello All I know it's been a while since I have posted but I wanted to try to get some help.

I want to use M2F [ M2F Site ] with my Icy Phoenix setup.  It is supposed to work with phpBB2.

I have made some attempts but keep ending up with it not working.  Could someone direct me on how to do this or provide some form of instruction on how to get this working out?


d16174l4n63l wrote: 

With these here I am just removing anything past the $user_ip right?


I don't know how Spydie's example could have been written any plainer - - - - - - Or the sample I posted with this instruction added: "Session management no longer uses "PAGES" etc."


So rather than waste any more of my time with this, I'll leave it up to others to help you sort it out.
 



 
mortSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Wanted: Help Testing And Debugging M2F 
 
I eventually figured out the issues on my own and got it working on the 1.2 build.  With the lack of response received I decided that at the time it was better for me to work things out instead of posting bump or a set of instructions and files that the community had at that time shown no real interest in.  Granted this was a while back.

The other part you have to understand is that the guide that used to be sitting around is rather obsolete as some of the files that used to be there no longer exist within the standard 1.3 setup and some of the ways that IP functions has been streamlined a little more outside the phpbb2 constraints.  That all being said it requires me to get into what has changed more and talk to the community.

Further, the files I have uploaded work for the most part, not efficiently but they do work.

If you feel that this is a waste of time to help me work this out then so be it, I'll hold no ill will towards you.  However I think it is rather unfair that within a couple of posts and less than a couple days this conversion is being thrown as a waste of time.  Along with circumspect as to the possibility of getting it stream line for one of the best CMS out there.

I'll eventually get it working, I would rather do it as all things open source working with a community of knowledgeable and talented people like yourself, than hording the basement as it where.  Even as I am posting this I am going line by line again and again over the same files.

As for the directions, just because you read it as being direct, does not mean I interpenetrated it as being as direct and desired clarification.  I don't think it's a bad thing to ask for clarification to make sure that the advice is taken as it should be.

could just be me.


Either or, I am still combing over the code and will have an update probably around midnight EST.  I appreciate the support and hopefully we can get this fine mod working again for those of us who would like this functionality.
 



 
d16174l4n63lSend private message  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron