grab motd, put in text form on another page

Here you can find plenty of help with your general coding needs and projects
If it is about a specific program, use the corresponding forum
DO NOT ask basic questions such as "How do I print a variable", use Google for that

grab motd, put in text form on another page

Postby derangedtaco » Fri Nov 24, 2006 2:30 pm

ok. this is all i need to do. grab the motd from the lua file and display it in text form... not as an image, as it does when you to to the roster index page...

and i want the text to be displayed on another page, out of the roster root folder.how can i do this

edit: oh yeah i also need to do this for the guild info...put it on another page..but it is not rendered as an image, it is rendered as text...but still how can i move it to another page
Last edited by derangedtaco on Fri Nov 24, 2006 2:32 pm, edited 1 time in total.
derangedtaco
WR.net Apprentice
WR.net Apprentice
 
Posts: 39
Joined: Fri Nov 24, 2006 12:24 am

grab motd, put in text form on another page

Postby PleegWat » Fri Nov 24, 2006 3:31 pm

Include settings.php then read it from the $guild_info array
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Re: grab motd, put in text form on another page

Postby derangedtaco » Fri Nov 24, 2006 3:38 pm

PleegWat wrote:Include settings.php then read it from the $guild_info array

could you please show me how to do this? i dont code php

i appreciate the help! :mrgreen:
derangedtaco
WR.net Apprentice
WR.net Apprentice
 
Posts: 39
Joined: Fri Nov 24, 2006 12:24 am

Re: grab motd, put in text form on another page

Postby derangedtaco » Fri Nov 24, 2006 3:41 pm

umm also 1 more thing. in the main roster view, is it possible to make all of the tables have the same width %?? i dont like it how it is now, each section is all blocked up..you see
http://www.derangedtaco.com/groster/
just, tell me where the table gets rendered, then i can change the width and go from there

kthx

edit: 2 more questions. 1) in this row
Code: Select all
Name     Class     Level     Announcements     Last Zone     Last Online
i want to switch"announcements" to "Rank", which makes more sense..where is this located

and....where is the top block located.. ? the navigation block that has the title, all of the addons, etc. because im only going to use this for the roster feature, that's all. thanks

sorry one more edit: i want to un-link my name in the roster, because i will not expect my members to get all of the mods n stuff, so i dont wanna be the only one with armor stats, etc..so how can i get rid of the url? you get my drift prolly...sorry not explaining self well..very sleepy.. :scratch:

rofl. 1 more. i want the notes not to show up in a tooltip when you mouseover a member, but to have it show up in the row..
Last edited by derangedtaco on Fri Nov 24, 2006 4:36 pm, edited 3 times in total.
derangedtaco
WR.net Apprentice
WR.net Apprentice
 
Posts: 39
Joined: Fri Nov 24, 2006 12:24 am

Re: grab motd, put in text form on another page

Postby derangedtaco » Sat Nov 25, 2006 8:39 am

any help pls? i sure can use some :thumright:

edit another issue has come up for me: i try to upload my characterprofile.lua file to derangedtaco.com/groster/admin, and it says in the log 404 not found. does this file need to exist? i dont know how this works... i can manually upload the characterprofile.lua file, and it works, but i can't get uniuploader to get the job done.
Last edited by derangedtaco on Sat Nov 25, 2006 11:44 pm, edited 1 time in total.
derangedtaco
WR.net Apprentice
WR.net Apprentice
 
Posts: 39
Joined: Fri Nov 24, 2006 12:24 am

grab motd, put in text form on another page

Postby zanix » Sun Nov 26, 2006 7:10 pm

You are in violation of our license agreement
Comply with it and you will be eligible for support
Last edited by zanix on Sun Nov 26, 2006 7:16 pm, edited 1 time in total.
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: grab motd, put in text form on another page

Postby derangedtaco » Sun Nov 26, 2006 11:57 pm

zanix wrote:You are in violation of our license agreement
Comply with it and you will be eligible for support

ugh sorry. i didnt mean to do that. i just see all of this crap down by the footer, think its ugly and remove all of the stuff in the footer file. i'm sorry. i didnt notice

how is it now? :blackeye:
derangedtaco
WR.net Apprentice
WR.net Apprentice
 
Posts: 39
Joined: Fri Nov 24, 2006 12:24 am

grab motd, put in text form on another page

Postby zanix » Mon Nov 27, 2006 5:21 am

The full credits are required
Blizzard requires them on every WoW related page

You also have to promise to not remove the credits after I help you
Last edited by zanix on Mon Nov 27, 2006 5:26 am, edited 1 time in total.
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: grab motd, put in text form on another page

Postby derangedtaco » Mon Nov 27, 2006 8:27 am

zanix wrote:The full credits are required
Blizzard requires them on every WoW related page

You also have to promise to not remove the credits after I help you

ok its up

and i give you my word :thumleft:
derangedtaco
WR.net Apprentice
WR.net Apprentice
 
Posts: 39
Joined: Fri Nov 24, 2006 12:24 am

grab motd, put in text form on another page

Postby zanix » Mon Nov 27, 2006 9:13 am

My advice is to just re-extract the original roster_footer.php from the zip package.

I see that you are trying to put the proper credits back so I'll help you out
We, and I'm sure blizz, appreciates this.

I would suggest finding some quick tutorials for php on the net, it will give you a good start and will give you some good fundamentals.




Upload data with UniUploader
The url you use to upload data to Roster is
Code: Select all
http://www.derangedtaco.com/groster/update.php

Not
Code: Select all
http://www.derangedtaco.com/groster/admin





Table width problem
Someone has already figured that out
http://www.wowroster.net/Forums/viewtopic/t=1819.html
and
http://wowroster.net/Forums/viewtopic/p=5748.html#5748




Announcements problem
I believe this is due to a localization error with the Announcements addon overriding a value in Roster's localization

Look at that addon's localization.php file and change that word
If it changes on the main page, then you know it is that addon's fault

If so, I would report this as a bug in that forum




The Roster Menu (top block)
The code is located at lib/menu.php
Menu management will get better in version 1.8, it will be more customizable
When editing this, all I ask is to leave the button/link to the credits page




No Character Details
Best way to achieve this is to clear (empty) all Roster tables except the following
This will clear all character specific data
  • roster_config
  • roster_guild
  • roster_memberlog
  • roster_members
Then open update.php in a text editor

Find this section
Code: Select all
if( is_array($uploadData['myProfile']) )
{
    
$updateMessages processMyProfile($uploadData['myProfile']);
}

if( 
is_array($uploadData['PvpLogData']) )
{
    
$updatePvPMessages processPvP($uploadData['PvpLogData']);


And change to this
Code: Select all
/*
if( is_array($uploadData['myProfile']) )
{
    $updateMessages = processMyProfile($uploadData['myProfile']);
}

if( is_array($uploadData['PvpLogData']) )
{
    $updatePvPMessages = processPvP($uploadData['PvpLogData']);
}
*/ 

This edit will disable uploading of character data from CharacterProfiler.lua and PvPLog.lua

Then go into Roster Config and disable PvPLog uploading
It's in the "Main Settings" labeled "Allow upload of PvPLog Data"
This edit removes the pvplog.lua upload box on update.php




Notes in tooltips
Open memberslist.php
Find this
Code: Select all
function name_value $row 

This function controls the name column, which has to tooltip

Change this line
Code: Select all
$tooltip .= ($row['nisnull'] ? '' "\n".$wordings[$roster_conf['roster_lang']]['note'].': '.$row['note']); 

To this
Code: Select all
//$tooltip .= ($row['nisnull'] ? '' : "\n".$wordings[$roster_conf['roster_lang']]['note'].': '.$row['note']); 


Next, go to Roster Config under "Display Config" labeled "Note Display Mode"
Change this to text




This may work for grabbing the motd

Edit and save anywhere on your web server
Code: Select all
<?php

// Set your guild name
$guild_name 'GUILDNAME';

// Config this for your server settings
$mysql_db 'roster';
$mysql_server 'localhost';
$mysql_user 'dbuser';
$mysql_pass 'dbpass';




/***
  DO NOT EDIT BELOW
***/


// Connect to mysql database
$link mysql_connect($mysql_server,$mysql_user,$mysql_pass);
if (!
$link)
{
   die(
'Could not connect: ' mysql_error());
}

// Select what database we will use
$db_selected mysql_select_db($mysql_db,$link);
if (!
$db_selected)
{
   die (
'Could not select database: ' mysql_error());
}

// Formulate Query
$query sprintf("SELECT `guild_motd` FROM `roster_guild` WHERE `guild_name` = '%s';",
  
mysql_real_escape_string($guild_name));

// Perform Query
$result mysql_query($query);

// Check result
// This shows the actual query sent to MySQL, and the error. Useful for debugging.
if (!$result)
{
   
$message  'Invalid query: ' mysql_error() . "\n";
   
$message .= 'Whole query: ' $query;
   die(
$message);
}

// Use result
$row mysql_fetch_assoc($result);

echo 
$row['guild_motd'];

// Free the resources associated with the result set
mysql_free_result($result);

?>
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: grab motd, put in text form on another page

Postby derangedtaco » Tue Nov 28, 2006 6:58 am

holy crap!!! thank you so much!!!
still, however, some problems..

-with the table width problem, it helped a lot, but still, the tables are a bit off...you see. at least in FF they are
- the no character details worked for the purpose i wanted it too, but it...created another problem. i need bank/bag data for a character of mine to be uploaded, for my guild bank...so is there just anyway to take out the link for each name? manually like that? i dont know how to explain this..help lol
- about the motd... yes that works perfectly! but i have a problem. with my cms, joomla, i cant put in php code. i also cant use iframes. but i can use javascript. is there any way to show the motd using javascript? i'm trying to think of how i could do this...ugh...LOL :shaking:

thank you again
derangedtaco
WR.net Apprentice
WR.net Apprentice
 
Posts: 39
Joined: Fri Nov 24, 2006 12:24 am

grab motd, put in text form on another page

Postby zanix » Tue Nov 28, 2006 9:09 am

Cool, every time I try to "align" the tables, they screw up

Yeah, I said that edit will disable uploading of data
Unfortunately, there are a lot of places in Roster you would have to edit to remove the link
memberlist.php the main, honor, and stats page uses this code to render the tables
As for the other pages, it's kinda scattered

There is no way that I know of to access a mysql database with javascript
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: grab motd, put in text form on another page

Postby derangedtaco » Tue Nov 28, 2006 11:52 am

zanix wrote:Cool, every time I try to "align" the tables, they screw up

Yeah, I said that edit will disable uploading of data
Unfortunately, there are a lot of places in Roster you would have to edit to remove the link
memberlist.php the main, honor, and stats page uses this code to render the tables
As for the other pages, it's kinda scattered

There is no way that I know of to access a mysql database with javascript

i emailed Ramsbams from this topic c http://www.wowroster.net/Forums/viewtopic/t=1819.html because he made it work apparently

well....gosh..that sux... isnt there a single place where it does <a href="<php stuff that i dont know here? because that'd be really handy...
derangedtaco
WR.net Apprentice
WR.net Apprentice
 
Posts: 39
Joined: Fri Nov 24, 2006 12:24 am

grab motd, put in text form on another page

Postby zanix » Tue Nov 28, 2006 12:56 pm

derangedtaco wrote:well....gosh..that sux... isnt there a single place where it does <a href="<php stuff that i dont know here? because that'd be really handy...

Nope, there is not
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: grab motd, put in text form on another page

Postby derangedtaco » Tue Nov 28, 2006 4:35 pm

zanix wrote:
derangedtaco wrote:well....gosh..that sux... isnt there a single place where it does <a href="<php stuff that i dont know here? because that'd be really handy...

Nope, there is not

i made my own fix..sorta crappy but it works
check it out if you want

now if that guy'll help me with my tables problem... :scratch:

edit: okay, all done :mrgreen:
Last edited by derangedtaco on Thu Nov 30, 2006 12:12 pm, edited 1 time in total.
derangedtaco
WR.net Apprentice
WR.net Apprentice
 
Posts: 39
Joined: Fri Nov 24, 2006 12:24 am

Next

Return to General Code Help

Who is online

Users browsing this forum: No registered users and 0 guests

cron