Search found 272 matches

by AGC
Thu May 05, 2011 1:16 am
Forum: [3.0.x] MOD Writers Discussion
Topic: Any RegEx Experts ?
Replies: 10
Views: 442

Re: Any RegEx Experts ?

Callum95 wrote:Try this:

Code: Select all

if (!preg_match('/^[a-zA-Z]{4,}/', $string))
{
	//blablabla
Nice. I'll add something.

To find three letters add this to the if statement.
preg_match('/[a-Z]{1,3}/', $string)
by AGC
Tue May 03, 2011 9:17 pm
Forum: [3.0.x] MOD Writers Discussion
Topic: Move code from index_body.html to viewforum_body.html, issue
Replies: 11
Views: 698

Re: Move code from index_body.html to viewforum_body.html, i

@Vinni
Correct me if I'm wrong but you gave him the same code and added $user->add_lang('mods/info_acp_gallery'); witch may not available.

@Mikael
Try to put the (original)code right before:

Code: Select all

// Okay, lets dump out the page ...
The template variables stay the same.
by AGC
Thu Apr 28, 2011 1:02 am
Forum: [3.0.x] MOD Writers Discussion
Topic: Viewing Username, Avatar and Signature in posting_body
Replies: 5
Views: 316

Re: Viewing Username, Avatar and Signature in posting_body

It's not the exact code, it's just an example, you have to change it to your needs
Find:

Code: Select all

	'USERNAME'				=> ((!$preview && $mode != 'quote') || $preview) ? $post_data['username'] : '', 
Add: (before or after) doesn't matter,

Code: Select all

      'POSTER_AVATAR'      => $user_cache[$poster_id]['avatar'],
by AGC
Wed Apr 27, 2011 6:02 pm
Forum: [3.0.x] MOD Writers Discussion
Topic: Viewing Username, Avatar and Signature in posting_body
Replies: 5
Views: 316

Re: Viewing Username, Avatar and Signature in posting_body

viewtopic.php ... 'avatar' => ($user->optionget('viewavatars')) ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], $row['user_avatar_width'], $row['user_avatar_height']) : '', ... // Send vars to template $template->assign_block_vars(array( 'POSTER_AVATAR' => $user_cache[$poster_id]['...
by AGC
Tue Apr 26, 2011 4:07 pm
Forum: [3.0.x] MOD Writers Discussion
Topic: passing a php set variable back to the form
Replies: 7
Views: 674

Re: passing a php set variable back to the form

As you said the variable didn't set and it's empty.

Code: Select all

request_var('chatusername', '', true)
Should be:

Code: Select all

$chat_username = request_var('chatusername', '', true)
by AGC
Tue Apr 19, 2011 12:04 am
Forum: [3.0.x] MOD Writers Discussion
Topic: Profile in viewonline
Replies: 12
Views: 1616

Re: Profile in viewonline

then what should it be? how do I fix it? First check if $[b]row['session_page'][/b] has u= in it. preg_match('#u=([0-9]+)#', $row['session_page'], $user_id); After that check what $user_id[1] filled with. $user_id = (sizeof($user_id)) ? (int) $user_id[1] : 0; I test the exact code and it works.
by AGC
Sun Apr 17, 2011 7:37 pm
Forum: [3.0.x] MOD Writers Discussion
Topic: Profile in viewonline
Replies: 12
Views: 1616

Re: Profile in viewonline

I meant when using this: $location = (strpos($row['session_page'], 'mode=viewprofile') !== false) ? sprintf($user->lang['VIEWING_MEMBER_PROFILE'], $username) : $user->lang['VIEWING_MEMBERS']; The $ username string is empty. The sql query didn't fetch anything. $user_id = (sizeof($user_id)) ? (int) $...
by AGC
Sun Apr 17, 2011 12:07 pm
Forum: [3.0.x] MOD Writers Discussion
Topic: Profile in viewonline
Replies: 12
Views: 1616

Re: Profile in viewonline

Are you sure you got the username ? $user_id = (sizeof($user_id)) ? (int) $user_id[1] : 0; $sql = 'SELECT user_type, username, user_colour FROM ' . USERS_TABLE . ' WHERE user_id = ' . $user_id; $results = $db->sql_query($sql); $rows = $db->sql_fetchrow($results); Most likely the string is empty and ...
by AGC
Sat Apr 16, 2011 1:42 am
Forum: [3.0.x] MOD Requests
Topic: Member Number [MOD REQUEST]
Replies: 8
Views: 497

Re: Member Number [MOD REQUEST]

what do I do to make show in the profile? +1 Sorry for the ancient bump but need to know how to do this in 3.0.8 Open ucp_main_front.html Find: <a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a> <br />{topicrow.LAST_POST_TIME}</span> </dd> After, add: <dd><strong>User Number:</strong>$poster_id</...
by AGC
Sat Apr 16, 2011 1:25 am
Forum: [3.0.x] MOD Requests
Topic: Inline code mod
Replies: 19
Views: 2391

Re: Inline code mod

Your Welcome.
by AGC
Fri Apr 15, 2011 11:41 am
Forum: [3.0.x] MOD Requests
Topic: Inline code mod
Replies: 19
Views: 2391

Re: Inline code mod

I Tried it on my Board and it dosnt work correctly O-O This Works all righ: TESTING But if i add any symbols in the code for example TEST/ING TEST*ING TEST!ING And any of this !@#$%^&*()_+|{} Symbols the bbcode dosnt get parsed so it looks like : TEST*ING Dos anyone have any idea what could be wron...
by AGC
Sat Apr 02, 2011 5:11 pm
Forum: [3.0.x] MOD Requests
Topic: 1,000 instead of 1000
Replies: 6
Views: 511

Re: 1,000 instead of 1000

... ( PHP 's number_format() only serves three digits grouping ). That what 1,000 means. Here are examples for number_format () function. $number = 1234.56; // english notation (default) $english_format_number = number_format($number); // 1,235 // French notation $nombre_format_francais = number_fo...
by AGC
Fri Apr 01, 2011 8:32 pm
Forum: [3.0.x] MOD Writers Discussion
Topic: Adsense Before Last Post
Replies: 5
Views: 397

Re: Adsense Before Last Post

Try to use - 1. It would be a simple style edit. In viewtopic_body.html, you'd add something like this <!-- IF postrow.S_LAST_ROW - 1 --> <!-- INCLUDE viewtopic_ads.html --> <!-- ENDIF --> Viewtopic_ads.php would have your AdSense code, and the tables/divs/spans and such that would make it look prop...

Go to advanced search