vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   PHP make thread (https://vborg.vbsupport.ru/showthread.php?t=319314)

Duckface 07-10-2015 07:15 PM

Quote:

Originally Posted by Duckface (Post 2549881)
Ahh, it's in some ways similar to java so I forget. Thank you.

How do you break a string to put it on two lines? So

PHP Code:

$threaddm->set('pagetext''Username Reporting: ' $username); //THEN ADD SOMETHING TO THE NEXT LINE 


MarkFL 07-10-2015 07:19 PM

What I suggest doing for clarity, is to build all of your strings first and then set the values.

Duckface 07-10-2015 07:24 PM

Quote:

Originally Posted by MarkFL (Post 2549885)
What I suggest doing for clarity, is to build all of your strings first and then set the values.

Hmm. Good tip.

I've tried using /n and /r but:

https://vborg.vbsupport.ru/external/2015/07/23.png

MarkFL 07-10-2015 09:09 PM

I misunderstood what you were wanting to do...try something like:

PHP Code:

$pagetext $line1 PHP_EOL $line2 PHP_EOL $line3 

The constant "PHP_EOL" (End Of Line) is cross-platform compatible too.

Duckface 07-10-2015 11:59 PM

Quote:

Originally Posted by MarkFL (Post 2549894)
I misunderstood what you were wanting to do...try something like:

PHP Code:

$pagetext $line1 PHP_EOL $line2 PHP_EOL $line3 

The constant "PHP_EOL" (End Of Line) is cross-platform compatible too.

Thank you so much for your assistance today, you've truly helped my PHP development as well; which was atrocious :).

MarkFL 07-11-2015 12:05 AM

I'm glad I was able to help you out. :D

Duckface 07-12-2015 05:06 PM

PHP Code:

$threaddm->set('parseurl''1'); 

I tried that to ensure that the links are parsed; but it isn't finding that method.

What's the method name for parsing the links?

Duckface 07-14-2015 06:03 PM

How do I make the thread automatically parse the links?

I've tried:

PHP Code:

//$threaddm->set('parselinks', true);        //Not working 

And it doesn't work :/.

kh99 07-14-2015 06:14 PM

I think it might be:
PHP Code:

$threaddm->set_info('parseurl'true); 

ETA: And I think you might need to do that before pagetext is set.

Duckface 07-15-2015 02:24 PM

Quote:

Originally Posted by kh99 (Post 2550222)
I think it might be:
PHP Code:

$threaddm->set_info('parseurl'true); 

ETA: And I think you might need to do that before pagetext is set.

Yea I'll give that a try thanks.


All times are GMT. The time now is 07:55 AM.

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.02254 seconds
  • Memory Usage 1,747KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete