vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   any one help me to limit the content size (https://vborg.vbsupport.ru/showthread.php?t=306141)

ymcus 12-21-2013 09:01 PM

any one help me to limit the content size
 
i want to limit my content size please help me how can i limit the page content length
what is its code
<blockquote class="postcontent restore ">
and
<meta name="description" content=
i want to set description length

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

any one help me from which file i can edit these settings

Lynne 12-23-2013 01:27 AM

I don't know of a way you can set the description length in default vbulletin - it looks like it takes the first 500 characters of the first post to use as the description. What did you want to change it to? You'll probably have to modify the files.

ymcus 12-23-2013 03:22 AM

many sites are using the title and the category name in description like vbulletindotorg watch in ur page source plz tell me the procedure to change this or modify these settings

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

or want to edit these settings upto 200 characters

Lynne 12-23-2013 05:14 PM

I think it may be set in showthread.php around like 349. Change 500 to 200.

HTML Code:

$thread['meta_description'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title($thread['meta_description'], 500, false)));

ymcus 12-23-2013 08:46 PM

thanks alot and if i want title and category name in description then what should i have to do

Lynne 12-24-2013 03:17 AM

Modify that line of code to put those things in there.

ymcus 12-24-2013 05:48 AM

Quote:

Originally Posted by Lynne (Post 2470203)
I think it may be set in showthread.php around like 349. Change 500 to 200.

HTML Code:

$thread['meta_description'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title($thread['meta_description'], 500, false)));

i have done it but it is giving me this error
Parse error: syntax error, unexpected T_STRING in /home/islamick/public_html/showthread.php on line 282

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

tell me what should i do to get rid from this error i have download the the file showthread.php and open it in dreamviewer then edit it after uploading it is giving me this error

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

what is proper encoding to edit application/x-httpd-php file???

Lynne 12-24-2013 05:11 PM

You should only use a plain text editor to edit any files and make sure the encoding you choose to save it in does NOT say "with BOM"!

ymcus 12-25-2013 02:23 AM

sure thanks the code is runing properly my file is ok now thanku so much dear sir

TommyHara 12-25-2013 02:54 PM

You need to write a php function to limit number of words on page on content.

ymcus 12-26-2013 04:43 PM

telll me the function

ymcus 12-27-2013 09:34 PM

Quote:

Originally Posted by Lynne (Post 2470380)
You should only use a plain text editor to edit any files and make sure the encoding you choose to save it in does NOT say "with BOM"!

dear sir,
i want to use my category description as my page description tell me the function by which i can do this

ymcus 12-29-2013 09:46 AM

Quote:

Originally Posted by Lynne (Post 2470203)
I think it may be set in showthread.php around like 349. Change 500 to 200.

HTML Code:

$thread['meta_description'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title($thread['meta_description'], 500, false)));



which variables should be placed in this code to show title and category name in description

please its urgent

ymcus 12-30-2013 12:29 PM

plz any one help me which variables should be placed in this code
description of this page is any one help me to limit the content size vB4 General Discussions
title + category name i dont know there variables in showthread.php and how can i place them in the code above
i have place $thread['titile'] in
this code
HTML Code:

$thread['meta_description'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title($thread['meta_description'], 500, false)));
now tell me plz how to add category name in description

i have run this code but it is not showing title+forum name in description
HTML Code:

$thread['meta_description'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title($thread['title'], $thread['forumid'], false)));
--------------- Added [DATE]1388431126[/DATE] at [TIME]1388431126[/TIME] ---------------

any one guide me plz

Lynne 12-30-2013 06:25 PM

This is not going to work:
HTML Code:

$thread['meta_description'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title($thread['title'], $thread['forumid'], false)));
You would need something like:
HTML Code:

$thread['meta_description'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title($thread['title'].$thread['forumid'], 500, false)));
Please see the api for that function here - https://members.vbulletin.com/api/vB..._trimmed_title The second parameter must be a number.

ymcus 12-30-2013 06:30 PM

Quote:

Originally Posted by Lynne (Post 2471375)
This is not going to work:
HTML Code:

$thread['meta_description'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title($thread['title'], $thread['forumid'], false)));
You would need something like:
HTML Code:

$thread['meta_description'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title($thread['title'].$thread['forumid'], 500, false)));
Please see the api for that function here - https://members.vbulletin.com/api/vB..._trimmed_title The second parameter must be a number.

sir $thread['forumid'] gives the output of forum id number but i want to display forum name
this code gives me the output of title and forum number but forum name
i had search a lot but i cant find the variable of forum category name
e.g:- any one help me to limit the content size vB4 General Discussions
title and forum category name

Lynne 12-30-2013 06:45 PM

Perhaps $foruminfo['title'] or $foruminfo['title_clean']

ymcus 12-30-2013 06:58 PM

Quote:

Originally Posted by Lynne (Post 2471379)
Perhaps $foruminfo['title'] or $foruminfo['title_clean']

thanku so much dear it is runing properly :)

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

i have tried
HTML Code:

$vbulletin->GPC['pagenumber']
to display page number in description but it is not showing the proper formate in the description. it is showing just number of page but i want to display this result " page 2".suggest please the proper variable

ymcus 01-02-2014 04:51 PM

???????????????????


All times are GMT. The time now is 07:14 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.01309 seconds
  • Memory Usage 1,763KB
  • 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
  • (10)bbcode_html_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (19)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete