Re: World of Mendal...
 
Notifications
Clear all

Re: World of Mendala SMF FORUM HELP

89 Posts
6 Users
0 Reactions
38.3 K Views
(@olandir)
Posts: 44
Eminent Member
 

An easy fix might be to replace the $points variable with another variable like $money in the stories.php

so instead of

// BEGIN SMFShop New Version (Build 12) code


$points = 20;

// Give the user their points
updateMemberData($uid, array('money' => 'money + ' . $points));

// END SMFShop

try

// BEGIN SMFShop New Version (Build 12) code


$money = 20;

// Give the user their points
updateMemberData($uid, array('money' => 'money + ' . $money));

// END SMFShop

That might fix it.


A. W. G. Coleman
Visit the World of Mendala
Home of the Fantasy/Adventure Series "Quest of the Seal Bearers"
Fanfiction, fanart, contests, prizes!

 
Posted : 02/06/2007 5:53 pm
(@confuzed)
Posts: 66
Trusted Member
Topic starter
 

thanks, I am just on my way out so I will try this tomorrow.  It just occurred to me to ask what would happen if you didnt specify an amount in stories.php, would it default to the forum amounts or not I wonder?


 
Posted : 02/06/2007 6:10 pm
(@olandir)
Posts: 44
Eminent Member
 

in theory it shouldn't do anything. but I dunno in your case.

Let me know your list of mods when you get a chance and also what happens when you change $points to $money.


A. W. G. Coleman
Visit the World of Mendala
Home of the Fantasy/Adventure Series "Quest of the Seal Bearers"
Fanfiction, fanart, contests, prizes!

 
Posted : 02/06/2007 6:12 pm
(@confuzed)
Posts: 66
Trusted Member
Topic starter
 

yay!  after some trial and error this morning, it is working.  I know what the problem was, I think.  In the shop admin there is also a section for adding bonuses, I switched all of that off and now it is giving the correct amount in the forum and the efiction. It is set with your latest code and gives 20 points per story or new chapter, which I guess is fair enough, although a points per word would have been nice too,  I dont want to change anything now its working lol

Now I will go try the gallery stuff and let you know.

Thanks for helping me with all of this


 
Posted : 03/06/2007 7:19 am
(@confuzed)
Posts: 66
Trusted Member
Topic starter
 

Okay, I'm giving you links to the mods and them some zip files with the modified files in it.

SMF Mod

This mod will add links for efiction and SMF gallery on your profile and on your posts

I use SMF Gallery Pro. I modified the "Custom Links" mod from SMFHacks website (thats the guy that makes SMF Gallery) so if you have the custom links mod for SMF Gallery you need to UNINSTALL and DELETE that mod first before using mine becuase its the same mod, only modified.

I made three versions of the same mod just in case other people might want this. This should work with these versions of SMF
1.1.2,1.1.1,1.1, 1.1 RC3, 1.1 RC2

Mod for those with SMF Gallery Pro and Efiction
http://www.mendala.com/mods/customlink-gallerypro.zip

Mod for those with SMF Gallery Lite and Efiction
http://www.mendala.com/mods/customlink-gallerylite.zip

Mod for those with just Efiction
http://www.mendala.com/mods/customlink-nogallery.zip

Remember you need to have your efiction bridged with SMF for these mods to be of any value.

The next post will have the links to the modified files that I have, I need to put them together first.

Let me know if something isn't working.

Something isn't working  πŸ˜›

I installed it ok, and the links to the gallery work fine but the efiction links are wrong and I get this:

Not Found
The requested URL /forum/stories/viewuser.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

so it's looking for stories in the wrong place, right?  my stories are in efiction/stories not forum/stories  or rather if I look at my stories I get this http://www.mysite.com/efiction/viewuser.php?action=storiesby&uid=

I dont have the header info changes like you have done, I dont know if that changes anything,  I dont think so but I thought I would mention it.  I will try changing the code and see if it works

edited to add, I changed the code from stories/viewuser....  to http://www.mysite.com/efiction/viewuser.php?action=storiesby&uid= and it is working in profiles but not in posts. 

In profiles it is displaying all the links and they take you to the member's stories, series etc
However, in posts, the view stories link for all members, takes you to my (admin) stories, yet it works in profiles *scratches head*

Also if members dont have anything in efiction (ie most are not writers) then it also takes you to my stories, any way around that or is it related to the post problem above?

Also in the forum error log there is an undefined index error over and over

8: Undefined index: member
File: /home/**/public_html/forum/Themes/default/Display.template.php
Line: 377

so I've had to uninstall the mod again πŸ™


 
Posted : 03/06/2007 7:59 am
(@darklight)
Posts: 170
Estimable Member
 

Will the mods for the efiction side of things that you have here work even if you don't have the store mod for SMF? Meaning the post counts. I'm pretty sure the links to the forum profile will work anyway.


 
Posted : 03/06/2007 1:08 pm
(@confuzed)
Posts: 66
Trusted Member
Topic starter
 

the post count code will work as that has nothing to do with the shop mod, so you could still use that and ignore the shop mod edits.


 
Posted : 03/06/2007 1:39 pm
(@olandir)
Posts: 44
Eminent Member
 

I can definitely fix the mods. I forgot about the linking issue but as soon as I get home, i can fix those mosds for you and they will work just fine πŸ™‚


A. W. G. Coleman
Visit the World of Mendala
Home of the Fantasy/Adventure Series "Quest of the Seal Bearers"
Fanfiction, fanart, contests, prizes!

 
Posted : 03/06/2007 1:59 pm
(@confuzed)
Posts: 66
Trusted Member
Topic starter
 

cool, thanks again Olandir

edit:

I also added the gallery code as per your post, but if you use this version there is an error in the forum error log when you add a new image:


// Begin SMFShop code - Modified as per http://www.daniel15.com/forum/index.php/topic,795.0.html
$points = 5;
updateMemberData($context['user']['id'], array('money' => 'money + ' . $points));
// End SMFShop code

http://www.mysite.com/forum/index.php?action=gallery&sa=add2

8: Undefined variable: context
File: /home/****/public_html/forum/Sources/Gallery.php
Line: 623

I am using gallery lite so the code is only in one place as per the thread on the shop forum.  But if you use this, as you said in the thread, you don't get the forum error. 

updateMemberData($ID_MEMBER, array('money' => 'money + ' . $points));

 
Posted : 03/06/2007 2:16 pm
(@olandir)
Posts: 44
Eminent Member
 

That last post confused me πŸ™‚

Are you talking about the thread on daniel's site?

Which code worked for you. I think I used the $ID_Member just because I always use that. Was that the one that didn't work or did work?


A. W. G. Coleman
Visit the World of Mendala
Home of the Fantasy/Adventure Series "Quest of the Seal Bearers"
Fanfiction, fanart, contests, prizes!

 
Posted : 03/06/2007 3:31 pm
(@confuzed)
Posts: 66
Trusted Member
Topic starter
 

yes sorry the thread you linked to on Daniel's forum.  the first code throws up the forum log error and the one that you did instead (using $ID_Member) doesnt.  So that is the one to use.


 
Posted : 03/06/2007 4:01 pm
(@olandir)
Posts: 44
Eminent Member
 

Oh, good to know.

Here's the deal with my link mods.

I hard coded the links into the mod. Now, you can just go into the mod and change the links (easy enough to see) or wait until this evening. I will try and remake the mod so that SMF will automatically know where the story archive is (assuming the two share a database... whiich they should anyway). It will just take me some time to do that.

If you don't want to wait, just go into the package and change the links so they work for you. I forgot that they were hardcoded.


A. W. G. Coleman
Visit the World of Mendala
Home of the Fantasy/Adventure Series "Quest of the Seal Bearers"
Fanfiction, fanart, contests, prizes!

 
Posted : 03/06/2007 4:08 pm
(@confuzed)
Posts: 66
Trusted Member
Topic starter
 

I did change the links in the package and then zipped it up again and it all works except for the efiction link on posts.  That doesnt work and throws up an error in the log as per previous post.  All the profile link work but the 'view stories' link on posts has the error as per previous post and the error in the log' though I can't see any difference between the profile code and the post code.

Also if someone doesnt have any stories it defaults to the Admin stories, maybe that's how it should be?


 
Posted : 03/06/2007 4:36 pm
(@olandir)
Posts: 44
Eminent Member
 

Oh good, now I don't feel so bad

The link in the post is completely my fault

The package code for the Post link says

<br /><a href=""stories/viewuser.php?action=storiesby&uid=',$content['member'"]['id'], '">', $txt['efiction_storylink'], '</a><br /><br />';

and what it should say is

<br /><a href=""stories/viewuser.php?action=storiesby&uid=',$message['member'"]['id'], '">', $txt['efiction_storylink'], '</a><br /><br />';

I was using the $content variable instead of the $message variable (which you'll notice the other profile links use. That will also fix the problem with going to the admin's page.

I have fixed the packages that are linked at the begining of this topic.  So you can either download the new ones or just change your package accordingly.

I really appreciate all your patience as we work these things out. This is the first time I've helped someone modify their site, so I'm prone to making simple mistakes when I tell you things because I'm so used to my "trial and error" appraoch, I forget that it's not as easy to fix a site that you're not directly looking at πŸ™‚

I'm sure by the time we're done, we'll have some perfect mods so I appreciate the patience.

I am going to try to build a more comprehensive mod that will attempt to gather the location of efiction so that the links can be made automatically. (that way you won't have to edit the package)


A. W. G. Coleman
Visit the World of Mendala
Home of the Fantasy/Adventure Series "Quest of the Seal Bearers"
Fanfiction, fanart, contests, prizes!

 
Posted : 03/06/2007 4:57 pm
(@confuzed)
Posts: 66
Trusted Member
Topic starter
 

I should have noticed that lol

ok, I changed $context to $message and it all works and goes where it should go.  I had to hardcode my links too as with your code it is looking for stories in mysite/forum/stories when they are in mysite/efiction/stories, but I guess that's what your comprehensive mod will do.

If you had any thoughts on the logging in and how it redirects you to the forum, meaning that you have to then click a link to get back, I would like to hear them. 

With the SMF/Joomla bridge they did have some code that they put in a forum template to redirect anyone went there directly, to send them to the joomla login box.  This is not the same but if it could be worked out that if you login to efiction and get redirected to the forum, under those circumstances only, it would automatically redirect you.  But obviously if people login to the forum directly, we dont want them redirected to efiction lol.  What I need is some kind of conditional redirection, or something that redirects you to the page you logged in from.  I'm sure that must exist somewhere for something else and could be applied to efiction.  This is old but http://www.simplemachines.org/community/index.php?topic=16361.msg135911#msg135911

or if I could somehow put the ssi for the login and logout in the header.php instead of the entire forum header (which I cant do because of TP) then would that work? OR would it still take you to the forum?


 
Posted : 03/06/2007 5:46 pm
Page 4 / 6
Share: