View Full Version : any one help me to limit the content size
ymcus
12-21-2013, 09:01 PM
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 1387710726 at 1387710726 ---------------
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 1387773006 at 1387773006 ---------------
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.
$thread['meta_description'] = htmlspecialchars_uni(fetch_censored_text(fetch_tri mmed_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
I think it may be set in showthread.php around like 349. Change 500 to 200.
$thread['meta_description'] = htmlspecialchars_uni(fetch_censored_text(fetch_tri mmed_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 1387898684 at 1387898684 ---------------
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 1387898946 at 1387898946 ---------------
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
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
I think it may be set in showthread.php around like 349. Change 500 to 200.
$thread['meta_description'] = htmlspecialchars_uni(fetch_censored_text(fetch_tri mmed_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 $thread['meta_description'] = htmlspecialchars_uni(fetch_censored_text(fetch_tri mmed_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
$thread['meta_description'] = htmlspecialchars_uni(fetch_censored_text(fetch_tri mmed_title($thread['title'], $thread['forumid'], false)));
--------------- Added 1388431126 at 1388431126 ---------------
any one guide me plz
Lynne
12-30-2013, 06:25 PM
This is not going to work:
$thread['meta_description'] = htmlspecialchars_uni(fetch_censored_text(fetch_tri mmed_title($thread['title'], $thread['forumid'], false)));
You would need something like:
$thread['meta_description'] = htmlspecialchars_uni(fetch_censored_text(fetch_tri mmed_title($thread['title'].$thread['forumid'], 500, false)));
Please see the api for that function here - https://members.vbulletin.com/api/vBulletin/_includes---functions.php.html#functionfetch_trimmed_title The second parameter must be a number.
ymcus
12-30-2013, 06:30 PM
This is not going to work:
$thread['meta_description'] = htmlspecialchars_uni(fetch_censored_text(fetch_tri mmed_title($thread['title'], $thread['forumid'], false)));
You would need something like:
$thread['meta_description'] = htmlspecialchars_uni(fetch_censored_text(fetch_tri mmed_title($thread['title'].$thread['forumid'], 500, false)));
Please see the api for that function here - https://members.vbulletin.com/api/vBulletin/_includes---functions.php.html#functionfetch_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
Perhaps $foruminfo['title'] or $foruminfo['title_clean']
thanku so much dear it is runing properly :)
--------------- Added 1388451562 at 1388451562 ---------------
i have tried $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
???????????????????
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.