Thank you saber, but I already did as much, and it's not a problem with the forum, but the nuke part. The Your Account module doesn't incorporate the random extended tags, nor does it set the signature variable the way that the forum Profile does.
That is the gist of the issue, and my php skills are severely lacking. I can easily change stuff once I know where to look and what to look for, but I'm not proficient enough to actually find such myself.
And I am fully aware of the limitations of the YA module myself evaders, unfortunately, for many of the users the Your Account and Profile links are considered one and the same. I'm not asking for any wonders really, just if such a thing as "fixing" the YA module to incorporate the tag is easily possible, or if not. If it's not, then that's fine too, I'll just tell everyone to not change the sigs in there if they want working links.
As for HTML, while possible, it's much easier for many of my users to use the BBcode tags, as those can easily be tested within the limits of the posts before putting into signatures. And because most people don't understand html, and I don't need any sigs outside of the forum, I don't really care about how it looks elsewhere, this site is a news front for a gaming guild, with a forum for communications, not something very elaborate that truly utilizes the capabilities of the nuke system
Joined: Oct 11, 2006 Posts: 11 Location: Boston, MA
Posted:
Sat Oct 14, 2006 9:25 am
OK so, I did a little testing on my site. It seems that if I viewed my sigs in the Your account -> Your Info module it would reset the Japanese characters to the html code. I had to go into the forums sig panel to fix it. I also notice that in the Your Account section that when it displayed the sig, it did so by messing up the BBCode and the Japanese characters. I took out the section that displayed the sig and the section where you type the sig I put in instructions to set your sig in the forums. I did this in the \modules\Your_Account\index.php. Here are the lines I edited:
Thank you saber, for that piece of code, I'll likely adapt my own page to do the same.
As for the "problem" I've been seeing, I did a bit more testing with the database and that user_sig_bbcode_uid field.
Upon entering a completely random 10 digit alphanumeric code into this field, and extending the BBcode tags in the signature over the YA module with exactly the same code, I have managed to get all signatures working. So even with the YA module not really working together with BBcode at all, I can still make the sigs work in the forum when entering them this way.
Considering the extended tag changes with each saving of your forum Profile, even if you change nothing, but does not affect the sig in any way if you enter something by hand, I must assume that it's a randomizer that creates it. I can merely assume here, but wouldn't including such a randomizer and a tiny search & replace function be fairly easy to include into this module? Something like "Find BBcode tags, and replace all ] with :random10digits] then save same random10digits to user_sig_bbcode_uid"
*shrug* thought I'd share, seems simple enough, and for those that are working on a replacement of this module, it might help a tiny bit.
Joined: Feb 21, 2006 Posts: 1497 Location: In front of a screen....HELP! lol
Posted:
Sat Oct 14, 2006 8:32 pm
Been thinking about this, and for your_account to work with bbcode, you would need to be sure that forums are included in each site owners website, unless you duplicate the functions needed OR grab the $uid(name of the variable used) out of the sig first then, strip it before the input is applied, then reinsert the uid before it saves it to the database. There are a couple of other options and Im thinking of ways to grab the uid from the signature. Actuallly I think I know how, let me work on something and Ill get back to you on that.
This is to change it back before inserted into the database.
Find:
Code:
$user_sig = check_html($user_sig, 'html');
Below add:
Code:
$sql='Select user_sig_bbcode_uid From '.$user_prefix.'_users WHERE name=\''.$userinfo[username].'\'';
$result=$db->sql_query($sql);
$useruid=$db->sql_fetchrow($result);
$useruid=':'.$useruid['0'].'';
$user_sig=str_replace('^',$useruid,$user_sig);
To put a note in Find this in index.php:
<td bgcolor='$bgcolor2'><b>"._SIGNATURE.":</b>
Then change it to:
<td bgcolor='$bgcolor2'><b>"._SIGNATURE.":</b><BR>your notes, for example, To make this work correctly, you must type code in a different syntax, for example, [ img] would now be [ img^] and [/ img] would now be [/ img^].
Joined: Feb 21, 2006 Posts: 1497 Location: In front of a screen....HELP! lol
Posted:
Sun Oct 15, 2006 8:11 am
If anyone has anything they can alter this code with to make it fuind the bbcode, then I will be happy to change this code to where it will work with anything without entering something in, I will do my best to do it, Im working on something right now.
Joined: Feb 21, 2006 Posts: 1497 Location: In front of a screen....HELP! lol
Posted:
Sun Oct 15, 2006 6:13 pm
OK, now after a LOT of time, I came up with some stuff you might be interested in,
This alters the your_account bbcode, both before you edit it and before its inserted, yes it works.
Download
Only registered users can see links on this board! Get registered or login to the forums!
There youll find only one file, ya_functions.php
put that file in your includes directory(root of site/includes)
In index.php of the your_account module,
Find:
require_once("mainfile.php");
In line replace $userinfo['user_sig'] with $usersig
Find:
$user_sig = check_html($user_sig, 'html');
Add right below:
$user_sig=ya_sigencoder($user_sig);
Now this will make all your [img:blah15451] turn back into [img] when looking at the signature and it will turn it into the correct syntax before inserting as to not mess up your forums. This will probably not be necessary with later releases, This function will turn any code aloud by the forums(that I know of) into the correct syntax, img was only an example.
Now I hope this helps you out in your plite, but now I can use the the your_account module to edit my signatures and it WORK.
Joined: Feb 21, 2006 Posts: 1497 Location: In front of a screen....HELP! lol
Posted:
Thu Oct 26, 2006 8:07 pm
Just to reitterate this topic, Perhaps others will find it usefull but does anyone want to test this code out? I wouldnt mind if someone could send it through some serious debugging.
Im open to criticism and advice, but dont openly insult me, I am not the creator of the your_account module, Just the creator for this addon.
If I had ftp access, Id change only one thing, The settings in which it locates the = sign, Id create it to check for url= and the other things, so that it didnt split and write the wrong Junk of code when the user uses an equal sign. Ill do that when I get back, Sorry but I cant think of everything lol.
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum