[ Video Sharing CMS v4 ] How to create a new blank page in version 3.6?

Started by hamnawa,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hamnawaTopic starter

How can we create a new page blank page on the website to add some text and meta tag information.
  •  

PHPVibe A.

Use the pages function built-in. Or you need it to be fully built from scratch?

hamnawaTopic starter

I wold use that if I could customize the link structure at the moment it creates the link as example.com/read/page

I would like the link to be example.com/page without the category read.
  •  

PHPVibe A.

The you need to code it yourself.
index.php (component case)
- com/com_{your component}.php
- tpl/{your template}.php

hamnawaTopic starter

Isn't there any easy way to just remove /pages from the link.
  •  

PHPVibe A.

You can edit it from vibe_setts.php , but to remove it, I don't see any easy way.

hamnawaTopic starter

I did change read to .. as below:

define( 'page', '..' );


Now I am facing two issues first of all I get 404 error if I try to visit a created page.
Second how to get rid of the id from the ur after page name e.g example.com/page/4 to be example.com/page/

  •  

PHPVibe A.

There is no way man. I've told you you can't remove it, you can just change the name.

hamnawaTopic starter

But I while I changed read to .. the link structure showed in the Control Panel is according to my expectation.

It means it was example.com/page but clicking on it gives 404 anyway.

Second question how to get rid of id /1 /2 /3 etc from channels url is it possible?
  •  

PHPVibe A.

No, this is not Wordpress. It's 100% based on ids to locate elements.
It's normal to give 404, it's build to accept component/id/title or component/title/id (depends how that com is setup in the router file).

hamnawaTopic starter

OK Thanks for the info I asked these because I had all my urls without this id in version 2 or 3.1 I think which was possible then and have good ranking and indexed by all search engines.

Again about the page url as I said earlier changing read to whatever should work for the pages. I have it now like example.com/about/help/5 it shows it as it should in Moderator section but when I click it on it gives 404.

Now even I have this id at the end of the url it doesn't work it only works if I change it back to read the default. Is there any area where modification needed?
  •  

PHPVibe A.

Already told you in the previous post that you need to edit the router to change the id's positioning (lib/router.php). Add the rule under function token_id()

hamnawaTopic starter

After a lot of struggle i gave up to use the automated page creation.

Could you please guide me with creating my own you have advised above as below:

- index.php (component case)
- com/com_{your component}.php
- tpl/{your template}.php

I believe in index I need to add:

    case aboutus:
		$com_route = ABSPATH."/com/com_aboutus.php";		
		break;


Now my page only has some about page information where do i put that? in tpl_aboutus.php or com_aboutus.php?

What should be in other one if I would add my text in one of them?
  •  

PHPVibe A.


hamnawaTopic starter

I checked that I do not understand it. I am a beginner. Can I get instructions here?
  •  

hamnawaTopic starter

  •  

PHPVibe A.

Quote from: hamnawa on
After a lot of struggle i gave up to use the automated page creation.

Could you please guide me with creating my own you have advised above as below:

- index.php (component case)
- com/com_{your component}.php
- tpl/{your template}.php

I believe in index I need to add:

    case aboutus:
		$com_route = ABSPATH."/com/com_aboutus.php";		
		break;


Now my page only has some about page information where do i put that? in tpl_aboutus.php or com_aboutus.php?

What should be in other one if I would add my text in one of them?

If aboutus is not defined you need to use:

    case "aboutus":
		$com_route = ABSPATH."/com/com_aboutus.php";		
		break;


com/aboutus.php
<?php
// SEO Filters
function modify_title( $text ) {
 return 'My title';
}
function modify_content( $text ) {
global $error;
return 'My page text content with escaped \' for no error';
}

add_filter( 'phpvibe_title', 'modify_title' );
//Time for design
 the_header();
include_once(TPL.'/default-full.php');
the_footer();
?>

Similar topics (7)