Search Results

Search found 8 results on 1 pages for 'ipb'.

Page 1/1 | 1 

  • php parsing xml result from ipb ssi tool

    - by Sir Troll
    Last week my code was running fine and now (without changing anything) it is no longer able to parse the elements out of the XML. The response from the ssi tool: <?xml version="1.0" encoding="ISO-8859-1"?> <ipbsource><topic id="32"> <title>Test topic</title> <lastposter id="1">Drake</lastposter> <starter id="18">Drake</starter> <forum id="3">Updates</forum> <date timestamp="1345600720">22 August 2012 - 03:58 AM</date> </topic> </ipbsource> enter code here Update: Switched to SimpleXML but I can't extract data from the xml: $xml = file_get_contents('http://site.com/forum/ssi.php?a=out&f=2&show=10&type=xml'); $xml = new SimpleXMLElement($xml); $item_array = array(); var_dump($xml); foreach($xml->topic as $el) { var_dump($el); echo 'Title: ' . $el->title; } The var_dump output: object(SimpleXMLElement)#1 (1) { [0]=> string(1) " " }

    Read the article

  • How do I pass a custom field to a hook (Invision Power Board [ipb] / PHP)

    - by Julian Young
    A long shot but here's hoping someone has some experience coding PHP hooks for Invisions Power Board forum. I'm attempting to code a status addition and the PHP works fine on it's own, it's the passing of the IPB's reference to my hook that is the issue. I.E. You setup a custom field in your forum for MSN Username, then from within a skin / template hook you pass the custom field to the hook and then use your PHP code to check on the status. Here is the IPB skin code I am hooking into on Global-userInfoPane... <if test="authorcfields:|:$author['custom_fields'] != """> <foreach loop="customFieldsOuter:$author['custom_fields'] as $group => $data"> <foreach loop="customFields:$author['custom_fields'][ $group ] as $field"> <if test="$field != ''"> <li> {$field} </li> </if> </foreach> </foreach> </if> Although I could easily add my own skin hook here. i.e. <if test="myHookHere:|:1===1"></if> Literally all I need is a single custom field entry from here passed to my hook. If I query every member when the hook is run then that will result in many extra sql queries per page view. All I want to do is pass that specific custom field to the hook... i.e. myHookHere( $customfield['msn_username'] ) Is this possible? How do you reference the customfield? Can I execute pure PHP from here? Appreciate anyone that can help! I tried the official invision forums but not had much luck.

    Read the article

  • How to add dynamic profile fields in Invision Power Board?

    - by user361908
    I run a game server and want to link the persons in game character name and stats to Invision Power Board. I've setup IPB so players currently login with their in game login. That means their username on the forum is the same as their username for the game. They can have multiple characters on 1 account so ideally I'd like to allow them to choose a main character and display an actual image of that character and allow them to display other characters if they are online. Currently I'm doing something like this by hacking profileFields.php but it's messy and not very efficient on the user or server end. My code currently uses 2 custom fields which the player can enter their character names in. To display only their main character they enter the name in the first field. To also display other characters if they are online they enter the same name into the second field. To resolve the IDs I have to run a lot of queries. I know PHP but I am not familiar with IPBs code at all. I just need pointed in a direction where I can combine the 2 fields into 1 field. tl;dr: Here is my setup: Invision Power Board 3 Data is stored in MySQL on the same server the forum is hosted on. Usernames on the forum are identical to usernames in the game Here is a breakdown of what I'd like to do: In the edit profile section I need to resolve the forum username to the games account id then: Display a list of characters and allow them to choose which characters they want to display if they are online as well as a default character that will be displayed if none are online. In the posts user info pane: Display the online character or the default if none are online. Here is what I need to know: How to generate a list of characters in the profile edit form and allow selection (checkbox) of each character to display as well as the selection of a default character (radio or dropdown?) How to fetch the data and place it in the posts user info pane

    Read the article

  • How can I get a static URL to a map image using the Google Static Maps API?

    - by Argote
    === BACKGROUND === Hello, so I've published a Web-App (still in "Beta") which uses the Flickr API to get information for the photos of a particular Flickr user and generates IPB code to post any of his/her images. While Flickr now gives you the IPB code to show the image and link back to the photo site directly on its site, my App also has the option of embeding the title, description, select EXIF data, location information, etc. into the post for the IPB forum. === PROBLEM === I've most recently added the option to integrate a Google Maps image of the photo's geolocation data into the post by using the Google Static Maps API. The problem is that the image URL I have is in the following form (including IPB [IMG] tags): [IMG]http://maps.google.com/maps/api/staticmap?zoom=16&size=600x600&maptype=hybrid&markers=19.387687,-99.251732&sensor=false[/IMG] Which shows this example image (In practice the image size is user selectable): However, some IPB forums seem to not support dyamic image URLs which gives me a broken image, I'd like to replace the [IMG]http://maps.google.com/maps/api/staticmap?zoom=16&size=600x600&maptype=hybrid&markers=19.387687,-99.251732&sensor=false[/IMG] with something like [IMG]http://maps.google.com/maps/api/staticmap/map0000001.png[/IMG] which should be supported by all IPB forums. Thanks in advance for your help. In case you're interested, the most recent "released" version of my Web-App can be found here: http://flickr.argote.mx/ (The changes I mention here are still on local development server).

    Read the article

  • Web Services c#, Sending notifications Clients

    - by Diode
    I want to send a notification (say a string) to subscribers(subscribers ip addresses are in a database on the server side) by calling another method. when ever I call that method the output becomes error-some. [WebMethod] public string GetGroupPath(string emailAddress, string password, string ipAddress) { //SqlDataAdapter dbadapter = null; DataSet returnDS = new DataSet(); string groupName = null; string groupPath = null; SqlConnection dbconn = new SqlConnection("Server = localhost;Database=server;User ID = admin;Password = password;Trusted_Connection=false;"); dbconn.Open(); SqlCommand cmd = new SqlCommand(); string getGroupName = "select users.groupname from users where emailaddress = "+"'"+ emailAddress+"'"+ " and "+ "users.password = " + "'" +password+"'"; cmd.CommandText = getGroupName; cmd.Connection = dbconn; SqlDataReader reader = null; try { reader = cmd.ExecuteReader(); while (reader.Read()) { groupName = reader["groupname"].ToString(); } } catch (Exception) { groupPath = "Invalied"; } dbconn.Close(); dbconn.Open(); if (groupName != null) { string getPath = "select groups.grouppath from groups where groupname = " + "'" + groupName + "'"; cmd.CommandText = getPath; cmd.Connection = dbconn; try { reader = cmd.ExecuteReader(); while (reader.Read()) { groupPath = reader["grouppath"].ToString(); } } catch { groupPath = "Invalied"; } } else groupPath = "Invalied"; dbconn.Close(); if (groupPath != "Invalied") { dbconn.Open(); string getPath = "update users set users.ipaddress = "+"'"+ipAddress+"'"+" where users.emailaddress = " + "'" + emailAddress + "'"; cmd.CommandText = getPath; cmd.Connection = dbconn; cmd.ExecuteNonQuery(); dbconn.Close(); } NotifyUsers(); //NotifyUsers nu = new NotifyUsers(); //List<string> ipList = new List<string>(); //ipList.Add("192.168.56.1"); //nu.Notify(); return groupPath; } private void NotifyUsers() { Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); byte[] ipb = Encoding.ASCII.GetBytes("255.255.255.255"); IPAddress ipAddress = new IPAddress(ipb); IPEndPoint endPoint = new IPEndPoint(ipAddress, 15000); string notification = "new_update"; byte[] sendBuffer = Encoding.ASCII.GetBytes(notification); sock.SendTo(sendBuffer, endPoint); sock.Close(); } This is what has to be basically done. in the server side I have a listening thread and it gets notification when the server sends data( assume for now the database contains client ip address). then ever I call the web method it gives a error "invalid IPAddress" atline byte[] ipb = Encoding.ASCII.GetBytes("255.255.255.255"); thank you :) since this is my first ever post please be kind enough to give me a better feedback too :) thaks

    Read the article

  • ajax + freewebhostingarea body tag replacement

    - by mandnd
    im using freewebhostingarea and he searches for the body tag and add a banner the problem is im using ipb shoutbox (3.0.x) and everytime there a tbody tag he keeps putting that banner so the shoutbox is full of banners heres the code http://pastebin.com/d4KZJqu9

    Read the article

  • Forum engine with full LDAP integration [closed]

    - by Andrian Nord
    We are looking for forum engine which may actually maintain user data into LDAP, maybe via mods. Core point is about ability to maintain the data, i.e. all user profile settings, like nickname, password, email, avatar, birthday and others (preferably configurable). One example of good ldap integration, level of which I'm expecting, is drupal's ldap integration, which allows to map any user's attribute into ldap and keeps it in sync with database. Year ago I've done a small research over existing Free&FOSS engines and find out few forum engines with LDAP integration, namely SFM, phpBB and something else. The most maintained solution were provided by phpBB3, which supports LDAP integration out-of-box, but it is unable to sync data with changes in LDAP server made by other software. Actually it wasn't even propagating changes back, I'm not saying about ability to map additional attributes (other than name/password/email). Also, I haven't found any forum with architecture which have proper abstraction over user settings, thus I doubt that this engines (including phpBB) are possible to mod such functionality without introducing dramatic changes into core codebase. More recent research showed that even some commercial software, like IPB is unable to keep it's database synced with LDAP directory and map additional attributes. In other words, all support I've seen so far is simple user creation upon first user's login, which is not good for us, as forum is not primary site and should not maintain it's own users base (to reduce risk of possible collisions). LDAP import is required due to many other services (ftp, email, jabber, drupal site) using same users base. Currently we have forum embedded into Drupal site, but we are unsatisfied with it's features. BTW, we are using Linux and this is not duplicate of this question, as it's author seems to be satisfied with behaviour described above. So, my question is: Are there any (preferably FOSS&free) forum engines that may import, export, keep in sync, or otherwise integrade with LDAP user database (preferably with ability to map additional fields to ldap attributes)?

    Read the article

  • Convert charset in mysql query

    - by Yousf
    Hi, I have a question about converting charset from inside mysql query. I have a 2 databases. One for the website (joomla), the other for forum (IPB). I am doing query from inside joomla, which by default have "SET NAMES UTF8". I want to query a table inside the forum databases. A table called "ibf_topics". This table has latin1 encoding. I do the following to select anything from the not-utf8 table. //convert connection to handle latin1. $query = "SET NAMES latin1"; $db->setQuery($query); $db->query(); $query = "select id, title from other_database.ibf_topics"; $db->setQuery($query); $db->query(); //read result into an array. //return connection to handle UTF8. $query = "SET NAMES UTF8"; $db->setQuery($query); $db->query(); After that, when I want to use the selected tile, I use the following: echo iconv("CP1256", "UTF-8", $topic['title']) The question is, is there anyway to avoid all this hassle? For now, I can't change forum database to UTF8 and I can't change joomla database to latin1 :S

    Read the article

1