Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-23-2008, 08:48 PM
mariocaz mariocaz is offline
 
Join Date: Feb 2008
Location: Mexico, D.F.
Posts: 424
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Help with the code of a Mod, little PHP problem

Hi there,

I installed a Mod in my VB this one:

https://vborg.vbsupport.ru/showthrea...27#post1472727

but I have a little problem...........

The Mod have a code that is not working in my forum, this one:


Code:
	       $custom_message .= "".$forms['title']."\r\n$value\r\n\r\n";
	       $break = "\r\n\r\n";
I want to do a space like when we use the ENTER button in the keyboards of our computers


And with this the <br /> is showing it in the posts.

Code:
	       $custom_message .= "".$forms['title'].": $value<br /><br />";
	       $break = "<br /><br />";
How can I fix it ?

Help!!!!!
Reply With Quote
  #2  
Old 03-23-2008, 09:17 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this being displayed inside a template? Or is it part of a post?
Reply With Quote
  #3  
Old 03-23-2008, 09:29 PM
mariocaz mariocaz is offline
 
Join Date: Feb 2008
Location: Mexico, D.F.
Posts: 424
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

part of a post, that is why the <br /> is not working because in my forum the HTML is disable for posting

Thank you very much Opserty

--------------- Added [DATE]1206312543[/DATE] at [TIME]1206312543[/TIME] ---------------

$custom_message .= "[bold]".$forms['title']."[/bold]: $value<br /><br />";
$break = "<br /><br />";

I put because if I put it correct then you wouldn?t see the complete code.
Reply With Quote
  #4  
Old 03-23-2008, 09:55 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Firstly, please do not send me private messages regarding your thread. (You will see this specified in my signature).

Regarding your problem:

You will need to use \r\n inside of posts.
PHP Code:
// Try:
$custom_message .= "[b]"$forms['title'] ."[/b]: $value \n\n";
$break "\n\n"
Reply With Quote
  #5  
Old 03-23-2008, 09:57 PM
Jase2 Jase2 is offline
 
Join Date: Dec 2007
Location: USA
Posts: 1,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please post such questions in the mod thread

Regards Jason
Reply With Quote
  #6  
Old 03-23-2008, 10:19 PM
mariocaz mariocaz is offline
 
Join Date: Feb 2008
Location: Mexico, D.F.
Posts: 424
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Opserty, thank you so much again my friend and so sorry for sending you the MP I didn?t see your signature.

Well also that is not working......

I still see this:

Quote:
Mi pez esta enfermo
Medidas del Tanque:: 130 ?Usas Skimmer?: Si ?Que marca de Skimmer usas?: er ?Que iluminaci?n usas?: MH o HQI ?Cu?ntos focos de los antes mencionados usas?: 4 ?Que par?metros has hecho test y su valor?(Salinidad, Temperatura Amonia, Nitritos, Nitratos, Ph, Calcio, Fosfatos, Silicatos): pg
amonia
nitritos
nitrtos Alg?n comentario extra de tu acuario:: buy
Instead of this:

Quote:
Mi pez esta enfermo

Medidas del Tanque:: 130
?Usas Skimmer?: Si
?Que marca de Skimmer usas?: er
?Que iluminaci?n usas?: MH o HQI
?Cu?ntos focos de los antes mencionados usas?: 4
?Que par?metros has hecho test y su valor? (Salinidad, Temperatura Amonia, Nitritos, Nitratos, Ph, Calcio, Fosfatos, Silicatos): pg
amonia
nitritos
nitrtos
Alg?n comentario extra de tu acuario:: buy
And that is what I need.
Reply With Quote
  #7  
Old 03-23-2008, 10:44 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wait to see if you a get a reply to that post in the modification thread. I'm not too sure on how to solve your problem, it maybe related to the modification as opposed to vBulletin itself.
Reply With Quote
  #8  
Old 03-23-2008, 11:16 PM
mariocaz mariocaz is offline
 
Join Date: Feb 2008
Location: Mexico, D.F.
Posts: 424
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And the \t what is the function ?

--------------- Added [DATE]1206320586[/DATE] at [TIME]1206320586[/TIME] ---------------

WOOOWWWW I did it and is working....................

PHP Code:
$custom_message .= "[b]"$forms['title'] ."[/b]<br/> $value <br /><br />";
$break "<br />"
And now to add Red Color in the $value What I have to do ???

Thank you a lot!!!
Reply With Quote
  #9  
Old 03-24-2008, 10:25 AM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

\t is a tab when placed inside double quotes.

To change the colour of $value you either need to use the BBCode:
Code:
[COLOR=XXXXX]$value[/COLOR]
or the HTML Code:
Code:
<span style="color:red">$value</span>
.

Depending on which one works.
Reply With Quote
  #10  
Old 03-24-2008, 04:12 PM
mariocaz mariocaz is offline
 
Join Date: Feb 2008
Location: Mexico, D.F.
Posts: 424
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mmmmm in both cases appears an error in the top of the forum:

Parse error: syntax error, unexpected T_STRING in /home/allreef/public_html/inicio/newthread.php(135) : eval()'d code on line 26

Any idea, maybe it had to have " " ?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:07 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04321 seconds
  • Memory Usage 2,261KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete