By Ashley Rosenthal on Monday, 13 January 2014
Posted in General Issues
Replies 23
Likes 0
Views 692
Votes 0
Hello Mark!
I'm including your last reply to the super long thread that I had going so that you know what I'm responding to:

"Hello Ashley,

If you want the modules to appear during registration, the file that you should be adding to is located in /components/com_easysocial/themes/wireframe/registration/default.steps.php . Also, you don't really need to re-initialize the entire database process to actually get what you need. I am not too sure if this works but looking at it, I think you are trying to fetch stored user data which means they need to be registered on the site."

....I would like the modules (the minifeed modules) to appear on the users home page. I am indeed trying to fetch stored user data. One of the registration fields for my users is a series of checkboxes. Each checkbox has a name of a blog category on it. The data I am fetching is so that I can see what blog category the user wants to have appear on their homepage. I have included a mock image to show the flow of what I am trying to achieve.

This all being said, where would I place this file so that the modules are appearing on the users homepage?

I want to tell you that I really appreciate your ongoing support and commitment to your customers!
Hello Ashley,

What is the current menu item for the user's home page? Which layout is it currently using?
·
Monday, 13 January 2014 10:49
·
0 Likes
·
0 Votes
·
0 Comments
·
I'm sorry, I'm not sure what you're asking. The homepage url is http://www.skillfolio.com/loggedin if that helps.

I am using template YouBricks and the layout is Middle-Left-Right.
·
Monday, 13 January 2014 11:28
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Ashley,

On this page the user is still not logged in yet, what is the menu item that is set for the home?
·
Monday, 13 January 2014 12:12
·
0 Likes
·
0 Votes
·
0 Comments
·
Would you like to use my login for the website so you can see what the page is that you are directed to when you login?

I'll include it in the site details below
·
Monday, 13 January 2014 12:21
·
0 Likes
·
0 Votes
·
0 Comments
·
I won't really know what menu item is /loggedin using unless I have the access to the back end.
·
Monday, 13 January 2014 12:56
·
0 Likes
·
0 Votes
·
0 Comments
·
I will put the login information for both my joomla administrator page as well as the godaddy login. I hope that helps. Thanks again!
·
Monday, 13 January 2014 13:03
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Ashley,

I tried to check your site and the frontpage menu item seems to be from a Joomla article so I am not too sure how you could actually add these hacks.
·
Monday, 13 January 2014 23:03
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes, our homepage is a Joomla article because we have many customizations and modules outside of EasySocial that we use. Do you know of anyone who would know how to add a file into a Joomla article?

For example, could we make a custom html module and put the code into some file for that?

Thank you!
Ashley
·
Monday, 13 January 2014 23:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Hm, but you can't really enter "php" codes within an article or module
·
Tuesday, 14 January 2014 02:42
·
0 Likes
·
0 Votes
·
0 Comments
·
I found something interesting called Flexi Custom Code. It's a Joomla Extension that allows you to enter a PHP code or file as an individual module. I'm going to give it a try and I'll let you know how it works.
·
Tuesday, 14 January 2014 02:47
·
0 Likes
·
0 Votes
·
0 Comments
·
It looks like Flexi Custom Code will be the answer as far as how to use the php code that I'm creating. When I put the code into the Flexi Custom Code, it says that I am definitely connecting to mysql database properly but doesnt pull any of my minifeeds (I checked the database tables and I do indeed have the values in the data that would make the modules appear). I was taking a look at the minifeed.php that you sent me (on the last thread), and i was wondering how to get that to work. I see some code that I wasn't sure if I was supposed to replace it with something? For example, the: $db, Foundry::db( do I put something in here? ), $key, $value, and getmod( ).... We are coming incredibly close to our deadline and I need to get this function to work. I am very thankful for your help!
·
Tuesday, 14 January 2014 05:18
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Ashley,

If you use the code as it is it should work fine.
·
Tuesday, 14 January 2014 16:24
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

I tried using the code as is and it resulted in my website screen going completely blank. White screen but didn't show any errors. I have however edited the other php code that I was working on. I insert it into the Flexi Custom Code, and I have edited it several times in the hopes of getting it to work properly. Most of the variations of the code successfully access the mysqli database and even retrieve and display the correct minifeed, but I'm having trouble having it access the current logged in users specific data. Instead it just looks at the table and sees that the minifeed variable is mentioned in ANY of the many users' fields and retrieves the minifeed. Could someone take a look at the PHP and help me make sure that it is ONLY selecting from the logged in users data? Thank you for everything!

<?php

$con = mysqli_connect("************", "*********", "*************", "*************");

if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}

jimport( 'joomla.application.module.helper' );
$moduleart = JModuleHelper::getModule('arraarticles', 'ArtsARRA');

$sqlarts = mysqli_query ($con, "SELECT * FROM jos_social_fields_data WHERE uid = 'CURRENT_USER' AND data LIKE '%MINIARTS%'");

while ($row = mysqli_fetch_assoc($sqlarts))
{
echo JModuleHelper::renderModule($moduleart);
}
mysqli_close($con);

?>


//******A couple of the other variations I have tried were

if ($row=mysqli_fetch_assoc($sqlarts))
{
echo JModuleHelper::renderModule($moduleart);
)


//*********as well as using

$my = Foundry::user()
$user = $my->id //and then using $user in the mysqli query
·
Wednesday, 15 January 2014 12:12
·
0 Likes
·
0 Votes
·
0 Comments
·
You need to replace CURRENT_USER with,


Foundry::user()->id;
·
Wednesday, 15 January 2014 12:31
·
0 Likes
·
0 Votes
·
0 Comments
·
So this part should look like this instead?


$sqlarts = mysqli_query ($con, "SELECT * FROM jos_social_fields_data WHERE uid = 'Foundry::user()->id' AND data LIKE '%MINIARTS%'");
·
Wednesday, 15 January 2014 12:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

To correct your code:

$sqlarts = mysqli_query ($con, "SELECT * FROM jos_social_fields_data WHERE uid = '" . Foundry::user()->id . "' AND data LIKE '%MINIARTS%'");
·
Wednesday, 15 January 2014 18:24
·
0 Likes
·
0 Votes
·
0 Comments
·
It works! The entire code works now! A million thank you's! That was the last thing we were waiting on before we could do our soft launch. Thank you again!
·
Wednesday, 15 January 2014 22:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for updating Ashley, glad that your issues are resolved now. Please understand that we do not provide support for customizations and we are just helping you out here out of good faith.
·
Wednesday, 15 January 2014 23:01
·
0 Likes
·
0 Votes
·
0 Comments
·
I am incredibly thankful. I work with a large community of web developers and programmers and I have informed all of them about the fantastic products from Stackideas and the dedicated support team. Even before the extra customization help you've given me, Stackideas is without a doubt the most pleasant, helpful, and responsive company I've ever utilized.
·
Thursday, 16 January 2014 03:47
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

You're most welcome.
·
Thursday, 16 January 2014 10:58
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Ashley,

If it's not too much to ask for could you post a review for EasySocial and spread the love about it at http://extensions.joomla.org/extensions/clients-a-communities/communities/25616
·
Thursday, 16 January 2014 11:52
·
0 Likes
·
0 Votes
·
0 Comments
·
I am more than happy to write a review! I would do anything to help Stack Ideas, I really cannot say enough good things about your company! I just submitted it and it said that my review would be reviewed before posting.
·
Thursday, 16 January 2014 14:08
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks a million Ashley
·
Thursday, 16 January 2014 17:32
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post