Hi JoshPet, I installed this hack on 6.0.3 and it appears to work fine (i.e. the link appears in the WO page and links to a page where the username is entered properly) however when I try to post the message I get the error
"We have no record for the Username that you are trying to send this message to."
even though it is the correct username. Could this be because I have "allow special charachters in username in config options"? Although even when I have this set and try usernames which do not have spec chars it still does not work.
Any idea what could be causing this please?
BTW the url of the link in the case og 'guest' is:
Does it do it just for usrenames with special characters.
I had this running for a month or two on a 6.0.3 site... never had a problem. I was probably the one who used it the most.
You might check what the link should look like.... if special characters are turned on. Look at their profiles and mouse over the "Send a private Message" link..... that link should be the same as the one used in Who's online. That's really all it does. But maybe it does something I'm not aware of when you have special characters turned on.
If you're having problems with spaces in user names, I have some instructions about how to let spaces work when you have the special characters disabled. One of the Daves posted them and I saved it.
"Hi JoshPet, I installed this hack on 6.0.3 and it appears to work fine (i.e. the link appears in the WO page and links to a page where the username is entered properly) however when I try to post the message I get the error..."
This was due to a silly mistake I made when editing the template.
But I need showflat.php and showthreaded.php to use this only on specified forums using separate tmpl´s. All the other forums should work as normal.
Like this:
I have duplicated showthreaded.tmpl, showflat.tmpl and postlist.tmpl.
The duplicates are renamed to showthreadedhard.tmpl, showflathard.tmpl and postlisthard.tmpl.
In these files I´ve made my changes and then uploaded the files to templates/default.
In postlist.php, showflat.php and showthreaded.php I´ve done this (based on this mod. ):
I´ve changed this in postlist.php:
code: include ("$thispath/templates/$tempstyle/postlist.tmpl");
to this
code: if ($Board == "supertest") { include ("$thispath/templates/$tempstyle/postlisthard.tmpl"); } else { include ("$thispath/templates/$tempstyle/postlist.tmpl"); }
I´ve done the same in showflat.php and showthreaded.php, but with links to their specific templates, of course.
Later on, when the supertest forum is complete and ready for launch, I will change this:
code: if ($Board == "supertest") {
to this
code: if ($Board == "supertest" or $Board == "specialforum1" or $Board == "specialforum2" or $Board == "specialforum3") {
Supertest is my development forum, with admin only access. specialforum1, 2, 3, 4 etc is the not yet created forums that will use these modified features. There will be at least 15 of these special forums at the launch. All other forums will work as normal.
Is it possible to ad something like the change I´ve done in postlist.php, showlist.php and showthreaded.php, but instead of telling the x.php file what tmpl´s to use it states what link, PM or Reply, that should be used if the forum is a normal or modified one?
Now I have another problem, wich I think is far more complicated to work around.
I´m going to use these new forums as areas for personal ads. I want registered users to be able to advertise anonymously and recive answers to their UBBT account.
So what I need to do now is hide the posters username in every place it might show up. Commenting out (or mark as hidden) the recipent field in the PM window is not such a big deal, but a posters username shows up in so many different places: the link to the PM window, in various places showing new posts, in the posters sent messages box, etc etc.
Am I asking for to much here? Is this at all possible?
Wow.... that would be tough... and you can't fix the URL problem.
6.2 will be based on user number...which will fix the problem of the name showing in the URL.
I've got an idea.... I wonder if you can have user's post their replies.... but somehow rig those forums so that only the original poster could view the replies.
Almost like a private topic thing that we discussed here a while ago.
I took a quick look... and have this working on showflat.php..... I didn't look at showthreaded yet..... because there are some problems that I don't know how to work around.
While I kinda got it..... the whole thing is probably just out of my reach... maybe with enough hacking around it could be done. It would certainly take me alot more free time than I've got.
What this does.... (in showflat view) is only show the replies to the person who started the topic... everyone else only sees the main post:
The problems that I noticed off the top of my head: - the replies would show up in a search - the replies would show up when someone "showed all posts by this user" - when the user makes a reply...they can "view their post" then see the whole thread
code: ## ## Open showflat.php ##
# # Find this: #
// ----------------------------------------- // Grab the main post number for this thread $Number = addslashes($Number); $query = " SELECT B_Main FROM {$config['tbprefix']}Posts WHERE B_Number = '$Number' AND B_Board = '$Board' "; $sth = $dbh -> do_query($query); list ($current) = $dbh -> fetch_array($sth); $dbh -> finish_sth($sth);
# # Change to: #
// ----------------------------------------- // Grab the main post number for this thread $Number = addslashes($Number); $query = " SELECT B_Main, B_Username FROM {$config['tbprefix']}Posts WHERE B_Number = '$Number' AND B_Board = '$Board' "; $sth = $dbh -> do_query($query); list ($current,$MainUsername) = $dbh -> fetch_array($sth); $dbh -> finish_sth($sth);
# # Find this: #
// ----------------------------------------------------------------- // We need to know how many posts of this thread to display per page if ($fpart <= 1) { $Totalgrab = $Totaldisplay; } else { $Startat = $Totaldisplay * ($fpart - 1); $Totalgrab = "$Startat, $Totaldisplay"; } $Limit = "LIMIT $Totalgrab"; if ($fpart == "all") { $Limit = ""; }
$threadnumber = $Number;
# # Change to this: #
// ----------------------------------------------------------------- // We need to know how many posts of this thread to display per page if ($user['U_Username'] == $MainUsername) { if ($fpart <= 1) { $Totalgrab = $Totaldisplay; } else { $Startat = $Totaldisplay * ($fpart - 1); $Totalgrab = "$Startat, $Totaldisplay"; } $Limit = "LIMIT $Totalgrab"; if ($fpart == "all") { $Limit = ""; } } else { $Limit = "LIMIT 1"; }
$threadnumber = $Number;
Since you need this in a bunch of boards... you would need to add a lot of "if the board is xxxxxxx" then have it check if the $user['U_Username'] was equal to the B_Username of the main post. There would be lots of scripts you'd have to work this into.
Yes, it for personals. I want to give my registered user an anonymous personal advertisment area. "Man seeks Woman", Woman seeks Alien", "Alien seeks MiB".
Got this working with 6.2 BR2...It's really easy (hey, I figured it out...musta been easy;) )
All you have to do is in this:
code: //------------------------------------------------------ // Set up the link to send the user a Private Message - by JoshPet if ($config['private']) { $encoded = rawurlencode($Username); $privmessage = "<a href="{$config['phpurl']}/sendprivate.php?Cat=$Cat&User=$encoded"><img src="{$config['images']}/sendprivate.gif" alt="{$ubbt_lang['PRIV_HEAD']}" border="0"></a>"; }
If I remember right, you need to change the following in the instructions.
Code
ABOVE it, add this:<br /><br /> //------------------------------------------------------<br /> // Set up the link to send the user a Private Message - by JoshPet<br /> if ($config['private']) {<br /> $encoded = rawurlencode($Username);<br /> $privmessage = "<a href=\"{$config['phpurl']}/sendprivate.php?Cat=$Cat&User=$encoded\"><img src=\"{$config['images']}/sendprivate.gif\" alt=\"{$ubbt_lang['PRIV_HEAD']}\" border=\"0\"></a>"; <br /> }
change the encoded $Username to $EUsername and it'll work.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.