Main Menu
collapse

Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

User Info

Welcome Guest.
Please log in.

Who's Online

  • Dot Guests: 742
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]


Thanks for having an interest with our portal. If you have any requests for features, have a look at the Feature Requests board.

Basic Pathing Issues

Started by smosmo, August 05, 2010, 11:00:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

smosmo

Hi there,

I just recently found out about SimplePortal's existence and figured to give it a try. So far I've been liking it and started to customize my own portal theme. My PHP knowledge is below basic even though I'd say my XHTML/CSS knowledge is advanced.

During messing around with my own custom theme etc, I came across two php related issues which I can't figure out and was hoping to find some help here. I'm running SMF 1.1.11 & SimplePortal 2.3.2.

My first issue is: I installed SimplePortal on my webspace but am wanting to use a forwarded domain. When I go to Server Settings and change the Forum URL to the forwarded domain, it'll stop loading any images. There must be some sore of variable that I should be able to edit right? I have no idea where to find that though :( (also when I try to hardcore a picture in the footer by using src="images/picture.jpg" it won't load either, obviously this is the same issue :p)

My 2nd issue is related to the first issue: When I add pages and want to create links to these pages, what would be the best way for me to link to these pages? I figured to use the domain name that I am wanting to use for this when it's finished, however it seems that all automatically created links are using the URL that's stated as the Forum URL (at the Server Settings). I realize this is another variable that I should be able to edit but once again, I wouldn't know where to find this as well and how to correctly edit this if I find it.


As I just finished typing all this I figured this is probably an SMF issue rather than a SP issue? :( If anyone is able to help me out it'd be appreciated though; if not I'll try SMF support. Thanks in advance!

AngelinaBelle

I'm not sure I completely understood your questions.

After you get the information you are seeking at SMF, please ask again if you still have additional questions about SimplePortal.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

smosmo

#2
Sorry for that, I reread my post and saw I gave a very vague description. In the end I think it is more of a SP question but I will make a post on the SMF forums as well. To clear any confusion, basically it comes down to the following:

I have SP installed here: www.website1.com/SP/
I want to tell my friends they can visit the forum at: www.website2.com (this domain would be forwarding to website1.com/SP/)

This all works well, but when I go to website2.com and hover over a link it'll show it is going to www.website1.com/SP/index.php?action=xxx

So I changed the Server Settings in the admin panel and changed the Forum URL to www.website2.com instead of website1.com/SP/. Now, the website will still work but any images that are loaded through SP won't load anymore. (Such as the pictures in the profile block for example).

This must be a pathing issue and SP is trying to find the images at a location that they can't be found at. I would think that this must be fixable by changing a single line of code somewhere?

Hope this cleared it up.

AngelinaBelle

That is a confusing example, as website2.com already exists!
Could you post a link to a real test installation you've set up this way?

Do the avatars show up fine in posts and in ?action=profile?

This block uses loadMemberContext to make sure the avatar and other information is loaded in $memberContext.  But I can see in Profile.template.php that ?action=profile uses $context['member'] instead of $memberContext, and I don't understand the use of $context['member'] vs $memberContext (and I haven't worked out how $context['member'] is populated, either).

But the population of $memberContext['avatar'] looks like it ought to work (at least for uploaded or URL avatars). So I'm not sure how the redirection is getting it wrong.

Again, links to the test forum would really be a help to anyone willing to try to help you figure out your cross-domain problem.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

smosmo

#4
Somehow I broke the whole website and had to use the repair file to repair everything again. Miraculously suddenly everything worked. I have no idea why stuff didn't work properly before. I guess my issue got solved even though I have no idea what to tell anyone with that stumbles upon the same problem.

Thanks for the help anyway :)

Two very last (simple) questions!
In which file is "$member_info" defined? I'm trying to adapt the looks of the profile block and want to have the profile image float left. PortalBlocks loads this in as "$member_info['avatar']['image']" and I haven't been able to find the code for this.

And where is "$scripturl" defined? I see it coming by everywhere.

Ty

edit: I made a little workaround by putting a div around the variable that loads in the avatar so that I can still control the avatar. Still curious where I can find the actual image code though.

AngelinaBelle

It really helps to be able to search all of your php files.
On a PC, the command prompt "find" command is great (find /? for help).
Just cd to the correct directory and find /n "$member_info" *.php | more

A lot of stuff is loaded and defined in Load.php
But a lot of stuff (like scripturl) is defined in QueryString.php
$scripturl is checked and fixed in loadTheme (in Load.php)

You can see in PortalBlocks sp_userInfo that $member_info is just $member_info = $memberContext[$user_info['id']];

It is a mystery to me why this would be right in other places (like in the profile) but wrong in the user block.  It would help if you provided a link, so someone could see the generated HTML and maybe help you out a little bit.

You say
QuoteI made a little workaround by putting a div around the variable that loads in the avatar so that I can still control the avatar
I'm not sure what you mean by this.

Do you mean you change the code from

if (!empty($member_info['avatar']['image']))
   echo '
         ', $member_info['avatar']['image'], '<br /><br />';
to
if (!empty($member_info['avatar']['image']))
   echo '
         <div>', $member_info['avatar']['image'], '</div><br /><br />';


It would be interesting to see the difference in the HTML generated when you use this div.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

smosmo

Quote from: AngelinaBelle on August 17, 2010, 09:59:26 AM
You say
QuoteI made a little workaround by putting a div around the variable that loads in the avatar so that I can still control the avatar
I'm not sure what you mean by this.

Do you mean you change the code from

if (!empty($member_info['avatar']['image']))
   echo '
         ', $member_info['avatar']['image'], '<br /><br />';
to
if (!empty($member_info['avatar']['image']))
   echo '
         <div>', $member_info['avatar']['image'], '</div><br /><br />';


It would be interesting to see the difference in the HTML generated when you use this div.

Yup, that's exactly what I did. It worked perfectly; I was able to position the div (with the avatar inside) where I wanted it to be. In the end it actually seemed to be a nice solution as I put a picture within the div's background, allowing me to give everyone a standard avatar when they had not selected one yet (without having to mess with the php code).

Quote from: AngelinaBelle on August 17, 2010, 09:59:26 AM
It really helps to be able to search all of your php files.
On a PC, the command prompt "find" command is great (find /? for help).
Just cd to the correct directory and find /n "$member_info" *.php | more

Wish I had used that before. Probably would've saved me quite some time haha. Everything's working properly now though (except for some CSS adjustments I still have to make for certain IE versions >.<)

http://www.over-9k.com :)

Thanks for the help!

AngelinaBelle

Glad you found your solution.  Your site looks like just the thing for your horde members. Enjoy
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?