1
Beejay
Avatar question
  • 2004/10/19 7:20

  • Beejay

  • Quite a regular

  • Posts: 232

  • Since: 2004/6/5 2


I am using sub site module to network my sites. I want users to upload avatars via the main site only. In the sub site I want to point the avatar to mysite.com/uploads/blahblah.gif instead of sub.mysite.com/uploads/blahbalh.gif.

When I upload one from the main site at the moment it tries to get it from sub.mysite.com/uploads/blahbalh.gif on the sub site which of course dosn't exist.

When file do I need to edit to change sub.mysite.com/uploads/ to mysite.com/uploads/

Thanks in advance

2
m0nty
Re:Avatar question
  • 2004/10/19 8:18

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


i ran into the same problem.. you'll find the avatar will display right only on the site where it was uploaded to..

some of us are currently working on a full multisite setup for XOOPS at the moment and this is 1 of the key issues we're addressing..

at the moment it's a lot of manual work and there's a few methods you could use..

1 is to manually copy the uploaded avatar to each of the corresponding sites..

the other is to symlink each shared folder (not as simple a job for any1 without knowledge)

are the sites on the same server?

1 way i got round it when using ipboard on the multisite hack is to edit the actual module xoops_version file..

basically if you want a certain modules files (including uploads folder) to be common on all sites then you can make it redirect to that particular module on whatever domain you wish, i'll try explain


you have site A & site B

and a directory structure of


in root folder you have Site A & Site B

so site A has /siteA/modules/ipboard

site B has /siteB/modules/ipboard

so you want to share ipboard between both sites.. now u need to choose which sites ipboard you want to use..

we'll choose siteA for this example..

so now goto siteB/modules/ipboard

and open up xoops_version.php

find this line:

$modversion['dirname'] = "ipboard";

now from above when u see the directory structure, it's 3 folders back to the root path..

so here's the trick..

edit the line above..

and change it to:

$modversion['dirname'] = "../../siteA/modules/ipboard";


of course this has it's drawbacks in that whenever some1 on site b wants to use that module, they'll be redirected to the module on site A so they end up on Site A but at least the path would owrk for the image.. or uploaded file.. it also means your sites actually have to be on the same server too..

i'm not sure that method will work for avatars tho but it was the method i used for ipboard..

the other alternative is to edit the avatar modules code and change the upload path manually to point to the same folders..

we are working on this at mo but have to address which way we want to go with it..

3
m0nty
Re:Avatar question
  • 2004/10/19 8:34

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


actually just been thinkin about this..


maybe you could work round it by editing include/common.php

find this line:

define("XOOPS_UPLOAD_PATH", XOOPS_ROOT_PATH."/uploads");

&

define("XOOPS_UPLOAD_URL", XOOPS_URL."/uploads");

and then change the path & url accordingly so they all point to the same place.. ie (create a common uploads folder)

ie..

root path>

u have

siteA
SiteB
uploads

it may work.. i haven't tried it..

4
Beejay
Re:Avatar question
  • 2004/10/20 6:58

  • Beejay

  • Quite a regular

  • Posts: 232

  • Since: 2004/6/5 2


Thank you for your reply.

I only one of those I really understand is to change the avatar code. Where abouts in which file do I edit? I want to change it from film.intense-network.com/uploads to just intense-network.com.

Cheers

5
Beejay
Re:Avatar question
  • 2004/10/22 7:20

  • Beejay

  • Quite a regular

  • Posts: 232

  • Since: 2004/6/5 2


Just a little bump

Login

Who's Online

445 user(s) are online (65 user(s) are browsing Support Forums)


Members: 0


Guests: 445


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Sep 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits