Results 1 to 7 of 7
Hybrid View
-
17th Dec 2010, 07:13 AM #1OPMember
Code Rewrite
Hello,
I am trying to fix this mod so that it is compatible with smf 1.1.12
http://custom.simplemachines.org/mod...x.php?mod=1138
I am weak in database.
i searched and found that $smcFunc doesnt work with smf 1.1.12
Can you rewrite this function so that it works with smf 1.1.12 also ??
Code:function MetaTagsGenerateTeaser ($id_msg) { global $smcFunc; $request = $smcFunc['db_query']('', ' SELECT body FROM {db_prefix}messages WHERE id_msg = {int:id_msg}', array( 'id_msg' => $id_msg )); list ($teaser) = $smcFunc['db_fetch_row']($request); $smcFunc['db_free_result']($request);
anantgupta Reviewed by anantgupta on . Code Rewrite Hello, I am trying to fix this mod so that it is compatible with smf 1.1.12 http://custom.simplemachines.org/mods/index.php?mod=1138 I am weak in database. i searched and found that $smcFunc doesnt work with smf 1.1.12 Can you rewrite this function so that it works with smf 1.1.12 also ?? function MetaTagsGenerateTeaser ($id_msg) Rating: 5
-
17th Dec 2010, 11:54 AM #2OPMember
http://www.simplemachines.org/commun...topic=224166.0
http://dev.simplemachines.org/smcfunctions.php
here is the example how it is used.
Found this too
$smcFunc['db_fetch_row'] is similar to http://in.php.net/mysql_fetch_row
$smcFunc['db_free_result'] is similar to http://php.net/mysql_free_result
Help me
-
17th Dec 2010, 01:59 PM #3OPMember
Thought of editing the last reply but decided to make another reply
Next try...
Code:function MetaTagsGenerateTeaser ($id_msg) { $request = db_query("SELECT body FROM (smf_messages AS m) WHERE m.id_msg = 1"); list ($teaser) = mysql_fetch_row($request); mysql_free_result($request); // Format as a plain text string. $teaser = MetaTagsSpecialChars(str_replace('<br />', ' ', parse_bbc($teaser))); // Less than the teasear limit, just return. if(strlen($teaser) < 150) return $teaser; // Otherwise grab the teaser. $teaser = substr($teaser, 0, 150); return substr($teaser, 0, strrpos($teaser, ' ')); }
How to do it ?
People on smf support also not replying damn...
m.id_msg = 1
-
17th Dec 2010, 05:49 PM #4Member
Problem solved...
Can Do :-
PSD TO ANY CMS | PHP(Dynamic Site) | MySql | Script Customization | cUrl Related Work
Pm me for more info ;)
-
17th Dec 2010, 06:58 PM #5OPMember
Yeah.... Thanx warezrock
This mod will be out shortly for smf 1.1.12 by warezrock and me
-
22nd Dec 2010, 04:09 AM #6
-
23rd Dec 2010, 03:25 AM #7OPMember
Yeah was working on 1.1.12 only you need it ??
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Mod Rewrite Friendly URL -need help
By nk2join in forum vBulletinReplies: 3Last Post: 21st Aug 2012, 05:12 PM -
WCDDL v3 Rewrite
By AmN in forum Web Development AreaReplies: 3Last Post: 22nd May 2012, 01:19 AM -
[WCDDL] Mod Rewrite Help
By DEViANCE in forum Web Application/Script SupportReplies: 1Last Post: 28th Jun 2011, 04:28 PM -
wcddl v2 rewrite
By r0ck in forum Web Application/Script SupportReplies: 3Last Post: 4th Feb 2010, 02:30 AM -
.htaccess rewrite
By Golden Falcon in forum IP.BoardReplies: 0Last Post: 25th Jan 2010, 06:14 AM
themaLeecher - leech and manage...
Version 5.03 released. Open older version (or...