Forums

Css Module/Menu Item

BNDragon 09 Jan, 2015
hi there,

I have a big, big, big problem.

I'm using the same form in a Menu Item and in a Module. The module appears when a user go to a restrict area, so he need to login/register.

The problem is that in my menu item it looks like:

[attachment=0]Form.PNG[/attachment]

But in the module it is completely changed:

[attachment=1]Form Bad.PNG[/attachment]

I'm sure that it have the same css attached because I confirmed that it is the same form (Menu Item is Form A [it have a event switcher extra that set display:none to Login/Register area] and Module Form B is a copy of A[without the event switch]), so how can I correct this?

Thanks in advance,
BN
BNDragon 09 Jan, 2015
Hi again,

I got a new "tip", I clicked in a Social button in the module, and it don't work too.

The social button is for social login, so it basicly is a submit button, and when clicked it goes to an event switcher and imports some files to work (PHP code too long, so needed to add it by files), so by this behavior I bilieve that the files are not loading.
Importing files code as sugested by Bob:

Hi BN,

I hada quick look at this yesterday but didn't get as far as building a working sign in.

a) I added the hybridauth folder from the distribution package to the /components/com_chronoforms5/extras folder on my site.

b) I edited the config.php file to set the base_url like this

		"base_url" => JURI::root().'components/com_chronoforms5/extras/hybridauth/',


c) I copied the code from the Simple Sign-In with Twitter example and changed lines 5-7 to
// change the following paths if necessary
$path = JPATH_SITE.'/components/com_chronoforms5/extras/hybridauth/';
$config   = $path.'config.php';
require_once( $path.'Hybrid/Auth.php' );


This all seems to work in that it loads the library and throws a correct error. The next step would be to get some Application Keys - which I don't have - and add them to the config.php file to test I'm making a Connection*.

Bob

* I did see somewhere that Twitter may require an HTTPS connection to work correctly.



include JPATH_ROOT.'/components/com_chronoforms5/extras/SSphpCF.php';


BN
BNDragon 12 Jan, 2015
Hi there,

Some help here? I don't understand why this things are happening. :/

Thanks,
BN
GreyHead 12 Jan, 2015
Hi BN,

Hard to help as I don't understand what the problem is.

Where are the files that you are trying to load?

This code looks OK and should work
// change the following paths if necessary
$path = JPATH_SITE.'/components/com_chronoforms5/extras/hybridauth/';
$config   = $path.'config.php';
require_once( $path.'Hybrid/Auth.php' );

If in doubt add a test file that just has
<?php
echo 'xxx';
?>
and try requiring or including that.

Where does this line come from?
include JPATH_ROOT.'/components/com_chronoforms5/extras/SSphpCF.php';
Note that JPATH_ROOT and JPATH_SITE may not be the same.

Bob
BNDragon 12 Jan, 2015
Hi Bob,

// change the following paths if necessary
$path = JPATH_SITE.'/components/com_chronoforms5/extras/hybridauth/';
$config   = $path.'config.php';
require_once( $path.'Hybrid/Auth.php' );

This code is in
include JPATH_ROOT.'/components/com_chronoforms5/extras/SSphpCF.php';
file.
When my code becomes much extensive and/or I use some functions, I couldn't save my form, Cf or Joomla! gives me a 403 Page.
So Max give me a tip, put my code in a file and import it to CF. So, all my code is in SSphpCF.php file and I include it on my form, it works just fine. My problem is when I create a CF module, form some reason the css and the functions don't work.

Now I'll try your tip with the echo, the files is exactly in that path name
JPATH_ROOT.'/components/com_chronoforms5/extras

I had done everything that we have talked in my Social Login topic. And once more, it works just fine in a menu item but not in the module. :/

I'll make some more tests and came back soon.

BN
BNDragon 12 Jan, 2015
Hi Bob,

The echo was printed, so the import is just fine.

But I found a new thing, when I looked to the url it as the real url not the sef one
index.php?option=com_cck&view=form&layout=edit&type=article&Itemid=177

Could this interfere with the form? I don't think so, but at this time, I'm looking for something.

If you still couldn't understand the problem, please, just say, I'll try make a better explanation.

Thanks,
BN
BNDragon 12 Jan, 2015
Hi Bob,

Sorry keep just replying, but I found the problem, how it happens or why? Just don't know yet, it looks like impossible that some like this could happen.

So, the problem is one, I decided look line by line each form in firebug, and i found it:
The form in menu item have the
<form></form>
tags, but in the module form, they just aren't there.
How could just this happen? Doesn't make any sense to me :/

BN
BNDragon 14 Jan, 2015
Answer
Hi,

It looks that its the modules anywhere plug-in that is causing this problem, what it's strange, I had use it some times and never gave me such issue, well, I solve it set the CF module to the pages that I need and then I show/hide it with css.

Thanks,
BN
This topic is locked and no more replies can be posted.