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 login or register.

* Who's Online

  • Dot Guests: 884
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* 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]

Blocks speak! Do you have an interest in getting more blocks - or even making your own? The Blocks Board is for you!

Author Topic: Basic Pathing Issues  (Read 2593 times)

0 Members and 1 Guest are viewing this topic.

Offline smosmo

  • Semi Newbie
  • *
  • Posts: 17
  • SMF Version: 1.1.11
  • SP Version: 2.3.2
Basic Pathing Issues
« on: August 05, 2010, 11:00:29 PM »
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!
« Last Edit: August 05, 2010, 11:30:40 PM by smosmo »

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Basic Pathing Issues
« Reply #1 on: August 06, 2010, 02:22:44 PM »
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?

Offline smosmo

  • Semi Newbie
  • *
  • Posts: 17
  • SMF Version: 1.1.11
  • SP Version: 2.3.2
Re: Basic Pathing Issues
« Reply #2 on: August 06, 2010, 05:19:34 PM »
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.
« Last Edit: August 06, 2010, 05:22:34 PM by smosmo »

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Basic Pathing Issues
« Reply #3 on: August 10, 2010, 02:53:53 PM »
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?

Offline smosmo

  • Semi Newbie
  • *
  • Posts: 17
  • SMF Version: 1.1.11
  • SP Version: 2.3.2
Re: Basic Pathing Issues
« Reply #4 on: August 11, 2010, 04:54:26 PM »
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.
« Last Edit: August 11, 2010, 05:43:51 PM by smosmo »

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Basic Pathing Issues
« Reply #5 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
 
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
Code: [Select]
$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
Quote
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
I'm not sure what you mean by this.
 
Do you mean you change the code from
Code: [Select]
if (!empty($member_info['avatar']['image']))
   echo '
         ', $member_info['avatar']['image'], '<br /><br />';
to
Code: [Select]
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?

Offline smosmo

  • Semi Newbie
  • *
  • Posts: 17
  • SMF Version: 1.1.11
  • SP Version: 2.3.2
Re: Basic Pathing Issues
« Reply #6 on: August 17, 2010, 02:28:11 PM »
You say
Quote
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
I'm not sure what you mean by this.
 
Do you mean you change the code from
Code: [Select]
if (!empty($member_info['avatar']['image']))
   echo '
         ', $member_info['avatar']['image'], '<br /><br />';
to
Code: [Select]
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).

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!

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Basic Pathing Issues
« Reply #7 on: August 18, 2010, 09:21:07 AM »
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?