Advertisement:

Author Topic: <Resolved>Fixing Payment Plugin user-custom.php Issue  (Read 7141 times)

nootkan

  • Sr. Member
  • ****
  • Posts: 259
Re: Fixing Payment Plugin user-custom.php Issue
« Reply #30 on: February 04, 2014, 09:55:55 pm »
Okay I believe I have it resolved now.  I removed the

 
Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="<?php echo str_replace('_''-'osc_current_user_locale()); ?>">
<head>
        <?php osc_current_web_theme_path('head.php'); ?>
        <meta name="robots" content="index, follow" />
        <meta name="googlebot" content="index, follow" />
    </head>

from the header.php file and placed

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="<?php echo str_replace('_''-'osc_current_user_locale()); ?>">

Code: [Select]
osc_current_web_theme_path('head.php');
inside the user-custom.php file and it seems to function fine now.

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="<?php echo str_replace('_''-'osc_current_user_locale()); ?>">
<?php
    
/*
     *      Osclass – software for creating and publishing online classified
     *                           advertising platforms
     *
     *                        Copyright (C) 2013 OSCLASS
     *
     *       This program is free software: you can redistribute it and/or
     *     modify it under the terms of the GNU Affero General Public License
     *     as published by the Free Software Foundation, either version 3 of
     *            the License, or (at your option) any later version.
     *
     *     This program is distributed in the hope that it will be useful, but
     *         WITHOUT ANY WARRANTY; without even the implied warranty of
     *        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     *             GNU Affero General Public License for more details.
     *
     *      You should have received a copy of the GNU Affero General Public
     * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
     */
    
osc_current_web_theme_path('head.php');
    
osc_current_web_theme_path('header.php') ;

    
osc_render_file();

    
osc_current_web_theme_path('footer.php');
?>

The only thing I see wrong is that the <head> tags are missing when viewing page source for payment/menu.
« Last Edit: February 05, 2014, 12:14:16 am by nootkan »

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: <Resolved>Fixing Payment Plugin user-custom.php Issue
« Reply #31 on: February 04, 2014, 11:21:11 pm »
 :o

Sorry Tom, wasn't trying to tell you.... was merely looking for confirmation. :)

@nootkan, to be honest I really think the head reference should go inside header but if it works it works.

tomshaft

  • Hero Member
  • *****
  • Posts: 862
  • Osshaft for Osclass - Add 650 posts to my total
Re: <Resolved>Fixing Payment Plugin user-custom.php Issue
« Reply #32 on: February 04, 2014, 11:25:07 pm »
:o

Sorry Tom, wasn't trying to tell you.... was merely looking for confirmation. :)

@nootkan, to be honest I really think the head reference should go inside header but if it works it works.

Thought the same. Seems strange to have it like that but..... whatever it takes.

Tom

nootkan

  • Sr. Member
  • ****
  • Posts: 259
Re: <Resolved>Fixing Payment Plugin user-custom.php Issue
« Reply #33 on: February 05, 2014, 12:11:59 am »
Hi guys,  unfortunately it wouldn't work properly for me in the header.php.  It was causing issues with the dropdown login feature in the header.  Also I noticed duplicate head content when viewing the page source which was probably causing the login script to fail.  As soon as I removed the php head call from the header file the login issue disappeared.  When I placed the call in the user-custom.php file the login worked and the payment/menu page rendered properly.  As I stated the only issue I see now is no <head> tags surrounding the head content in the user-custom.php page when viewing the page source.  Probably a way to include it using php but I cannot figure it out. 

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: <Resolved>Fixing Payment Plugin user-custom.php Issue
« Reply #34 on: February 05, 2014, 12:21:36 am »
I see nootkan but the whole setup is based on head in header, at least in my setup using minimalist or bender 1.1.0.

Here's how bender header.php is setup:
Code: [Select]
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="<?php echo str_replace('_''-'osc_current_user_locale()); ?>">
    <head>
        <?php osc_current_web_theme_path('common/head.php') ; ?>
    </head>
<body <?php bender_body_class(); ?>>


When you put head in your header I can see issues maybe happening if you have in header a declaration/registration of some script that also is being registered in head.php ?  ::)


nootkan

  • Sr. Member
  • ****
  • Posts: 259
Re: <Resolved>Fixing Payment Plugin user-custom.php Issue
« Reply #35 on: February 05, 2014, 03:21:00 am »
This is the set up for osshaft_colors header.php so you can see it is a little different.  Doesn't matter I have that part working now.
Code: [Select]
<?php
/*
 *      Osclass – software for creating and publishing online classified
 *                           advertising platforms
 *
 *                        Copyright (C) 2012 OSCLASS
 *
 *       This program is free software: you can redistribute it and/or
 *     modify it under the terms of the GNU Affero General Public License
 *     as published by the Free Software Foundation, either version 3 of
 *            the License, or (at your option) any later version.
 *
 *     This program is distributed in the hope that it will be useful, but
 *         WITHOUT ANY WARRANTY; without even the implied warranty of
 *        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *             GNU Affero General Public License for more details.
 *
 *      You should have received a copy of the GNU Affero General Public
 * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
?>

<!-- container -->
<div class="container">
    <!-- header -->
    <div id="header">

matrix

  • Newbie
  • *
  • Posts: 12
Re: <Resolved>Fixing Payment Plugin user-custom.php Issue
« Reply #36 on: February 07, 2014, 09:53:33 am »
For those working with Modern, I was able to fix the problem as follows without having to touch header.php.

Here's what I did:

1. Make a local copy of user-alerts.php from your Modern theme folder
2. Rename your local copy of user-alerts.php to user-custom.php
3. Find <div id="main"> in the file
4. Remove everything below it up to the second last </div>
5. Paste <?php osc_render_file(); ?> between <div id="main"> and the second last </div>
6. Save and upload to the Modern theme folder.

The main section is <?php osc_render_file(); ?>, everything else is the template settings around it so I figured I could use any of the main user php files and simply replace the main section with <?php osc_render_file(); ?>.  It appears to have worked.  If anyone believes there might be a problem with this, please let us know.  I compared a couple of user php files and the main sections only appear to differ.

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: <Resolved>Fixing Payment Plugin user-custom.php Issue
« Reply #37 on: February 07, 2014, 10:20:24 am »
For modern theme, this one should work like a charm:
Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="<?php echo str_replace('_''-'osc_current_user_locale()); ?>">
<head>
  <?php osc_current_web_theme_path('head.php') ; ?>
  <meta name="robots" content="noindex, nofollow" />
  <meta name="googlebot" content="noindex, nofollow" />
</head>
<body>
  <?php osc_current_web_theme_path('header.php') ; ?>
  <div class="content user_account">
    <h1>
      <span><?php _e('User account manager''sofia') ; ?></span>
    </h1>
    <div id="sidebar">
      <?php echo osc_private_user_menu() ; ?>
    </div>

    <div id="main" class="ad_list">
      <?php osc_render_file(); ?>
    </div>
  </div>

  <?php osc_current_web_theme_path('footer.php') ; ?>
</body>
</html>